Skip to content

Commit 3ec582b

Browse files
committed
Merge remote-tracking branch 'upstream/master' into PR_267
Merge an updated verions of tokio-rs#267
2 parents e9d60fc + d5e9053 commit 3ec582b

File tree

6 files changed

+11
-9
lines changed

6 files changed

+11
-9
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ keywords = ["async", "fs", "io-uring"]
2020
tokio = { version = "1.2", features = ["net", "rt", "sync"] }
2121
slab = "0.4.2"
2222
libc = "0.2.80"
23-
io-uring = "0.5.13"
23+
io-uring = "0.6.0"
2424
socket2 = { version = "0.4.4", features = ["all"] }
2525
bytes = { version = "1.0", optional = true }
2626
futures-util = { version = "0.3.26", default-features = false, features = ["std"] }

src/buf/fixed/plumbing/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl<T: IoBufMut> Registry<T> {
7474
pub(crate) fn check_out(&mut self, index: usize) -> Option<CheckedOutBuf> {
7575
let state = self.states.get_mut(index)?;
7676
let BufState::Free { init_len } = *state else {
77-
return None
77+
return None;
7878
};
7979

8080
*state = BufState::CheckedOut;

src/io/fallocate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ impl Op<Fallocate> {
2525
x.handle().expect("not in a runtime context").submit_op(
2626
Fallocate { fd: fd.clone() },
2727
|fallocate| {
28-
opcode::Fallocate64::new(types::Fd(fallocate.fd.raw_fd()), len as _)
29-
.offset64(offset as _)
28+
opcode::Fallocate::new(types::Fd(fallocate.fd.raw_fd()), len as _)
29+
.offset(offset as _)
3030
.mode(flags)
3131
.build()
3232
},

src/io/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<T: BoundedBuf> UnsubmittedWrite<T> {
5353
buf,
5454
},
5555
WriteTransform {
56-
_phantom: PhantomData::default(),
56+
_phantom: PhantomData,
5757
},
5858
opcode::Write::new(types::Fd(fd.raw_fd()), ptr, len as _)
5959
.offset(offset as _)

src/io/writev_all.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl<T: BoundedBuf> Op<WritevAll<T>> {
135135
// So this wouldn't need to be a function. Just pass in the entry.
136136
|write| {
137137
opcode::Writev::new(types::Fd(write.fd.raw_fd()), iovs_ptr, iovs_len)
138-
.offset64(offset as _)
138+
.offset(offset as _)
139139
.build()
140140
},
141141
)

src/runtime/driver/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ impl Driver {
9797
&mut self,
9898
buffers: Rc<RefCell<dyn FixedBuffers>>,
9999
) -> io::Result<()> {
100-
self.uring
101-
.submitter()
102-
.register_buffers(buffers.borrow().iovecs())?;
100+
unsafe {
101+
self.uring
102+
.submitter()
103+
.register_buffers(buffers.borrow().iovecs())
104+
}?;
103105

104106
self.fixed_buffers = Some(buffers);
105107
Ok(())

0 commit comments

Comments
 (0)