Skip to content

Commit

Permalink
Merge #872
Browse files Browse the repository at this point in the history
872: Change sys::aio::lio_listio to sys::aio::LioCb::listio r=asomers a=asomers

The new LioCb structure allows us to control the exact arguments passed
to lio_listio, guaranteeing that each call gets a unique storage
location for the list argument.  This prevents clients from misusing
lio_listio in a way that causes events to get dropped from a kqueue

Fixes #870
  • Loading branch information
bors[bot] committed Apr 7, 2018
2 parents 2def43d + 4b769a4 commit 31e901b
Show file tree
Hide file tree
Showing 6 changed files with 617 additions and 271 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#876](https://github.com/nix-rust/nix/pull/876))
- Added `SO_MARK` on Linux.
- ([#873](https://github.com/nix-rust/nix/pull/873))
- Added safe support for nearly any buffer type in the `sys::aio` module.
([#872](https://github.com/nix-rust/nix/pull/872))
- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`.
([#872](https://github.com/nix-rust/nix/pull/872))
- Added `getsid` in `::nix::unistd`
([#850](https://github.com/nix-rust/nix/pull/850))
- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830))
Expand All @@ -35,6 +39,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#837](https://github.com/nix-rust/nix/pull/837))

### Removed
- Removed explicit support for the `bytes` crate from the `sys::aio` module.
See `sys::aio::AioCb::from_boxed_slice`s examples for alternatives.
([#872](https://github.com/nix-rust/nix/pull/872))
- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead.
([#872](https://github.com/nix-rust/nix/pull/872))

## [0.10.0] 2018-01-26

Expand Down
15 changes: 10 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ bitflags = "1.0"
cfg-if = "0.1.0"
void = "1.0.2"

[dependencies.bytes]
version = "0.4.5"
# Don't include the optional serde feature
default-features = false

[target.'cfg(target_os = "dragonfly")'.build-dependencies]
cc = "1"

[dev-dependencies]
# The examples use a new feature of Bytes which should be available in 0.4.7
# https://github.com/carllerche/bytes/pull/192
bytes = { git = "https://github.com/carllerche/bytes", rev = "ae1b454" }
lazy_static = "1"
rand = "0.4"
tempdir = "0.3"
tempfile = "2"

[target.'cfg(target_os = "freebsd")'.dev-dependencies]
sysctl = "0.1"

[[test]]
name = "test"
path = "test/test.rs"
Expand All @@ -39,6 +40,10 @@ path = "test/test.rs"
name = "test-aio-drop"
path = "test/sys/test_aio_drop.rs"

[[test]]
name = "test-lio-listio-resubmit"
path = "test/sys/test_lio_listio_resubmit.rs"

[[test]]
name = "test-mount"
path = "test/test_mount.rs"
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#![deny(missing_debug_implementations)]

// External crates
extern crate bytes;
#[macro_use]
extern crate bitflags;
#[macro_use]
Expand Down
Loading

0 comments on commit 31e901b

Please sign in to comment.