Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into PR_267
Browse files Browse the repository at this point in the history
Merge an updated verions of tokio-rs#267
  • Loading branch information
ollie-etl committed Oct 2, 2023
2 parents e9d60fc + d5e9053 commit 3ec582b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion src/buf/fixed/plumbing/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl<T: IoBufMut> Registry<T> {
pub(crate) fn check_out(&mut self, index: usize) -> Option<CheckedOutBuf> {
let state = self.states.get_mut(index)?;
let BufState::Free { init_len } = *state else {
return None
return None;
};

*state = BufState::CheckedOut;
Expand Down
4 changes: 2 additions & 2 deletions src/io/fallocate.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,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
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,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
Original file line number Diff line number Diff line change
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 3ec582b

Please sign in to comment.