Skip to content

Commit

Permalink
chore: upgrade io-uring to 0.6.0 (#277)
Browse files Browse the repository at this point in the history
Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>
  • Loading branch information
lizhanhui committed Aug 12, 2023
1 parent 34b27ab commit d5e9053
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -20,7 +20,7 @@ keywords = ["async", "fs", "io-uring"]
tokio = { version = "1.2", features = ["net", "rt", "sync"] }
slab = "0.4.2"
libc = "0.2.80"
io-uring = "0.5.13"
io-uring = "0.6.0"
socket2 = { version = "0.4.4", features = ["all"] }
bytes = { version = "1.0", optional = true }
futures-util = { version = "0.3.26", default-features = false, features = ["std"] }
Expand Down
4 changes: 2 additions & 2 deletions src/io/fallocate.rs
Expand Up @@ -25,8 +25,8 @@ impl Op<Fallocate> {
x.handle().expect("not in a runtime context").submit_op(
Fallocate { fd: fd.clone() },
|fallocate| {
opcode::Fallocate64::new(types::Fd(fallocate.fd.raw_fd()), len as _)
.offset64(offset as _)
opcode::Fallocate::new(types::Fd(fallocate.fd.raw_fd()), len as _)
.offset(offset as _)
.mode(flags)
.build()
},
Expand Down
2 changes: 1 addition & 1 deletion src/io/write.rs
Expand Up @@ -49,7 +49,7 @@ impl<T: BoundedBuf> UnsubmittedWrite<T> {
buf,
},
WriteTransform {
_phantom: PhantomData::default(),
_phantom: PhantomData,
},
opcode::Write::new(types::Fd(fd.raw_fd()), ptr, len as _)
.offset(offset as _)
Expand Down
2 changes: 1 addition & 1 deletion src/io/writev_all.rs
Expand Up @@ -134,7 +134,7 @@ impl<T: BoundedBuf> Op<WritevAll<T>> {
// So this wouldn't need to be a function. Just pass in the entry.
|write| {
opcode::Writev::new(types::Fd(write.fd.raw_fd()), iovs_ptr, iovs_len)
.offset64(offset as _)
.offset(offset as _)
.build()
},
)
Expand Down
8 changes: 5 additions & 3 deletions src/runtime/driver/mod.rs
Expand Up @@ -97,9 +97,11 @@ impl Driver {
&mut self,
buffers: Rc<RefCell<dyn FixedBuffers>>,
) -> io::Result<()> {
self.uring
.submitter()
.register_buffers(buffers.borrow().iovecs())?;
unsafe {
self.uring
.submitter()
.register_buffers(buffers.borrow().iovecs())
}?;

self.fixed_buffers = Some(buffers);
Ok(())
Expand Down

0 comments on commit d5e9053

Please sign in to comment.