Skip to content

Commit 9ed6ff3

Browse files
committed
activate
1 parent a38893c commit 9ed6ff3

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

riffle-server/src/store/local/uring_io.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ struct UringIoCtx {
239239
tx: oneshot::Sender<anyhow::Result<(), WorkerError>>,
240240
io_type: UringIoType,
241241
addr: RawFileAddress,
242-
w_bufs: Vec<bytes::Bytes>,
242+
w_bufs: Vec<RawBuf>,
243243
r_bufs: Vec<RawBuf>,
244244
}
245245

@@ -303,7 +303,7 @@ impl UringIoEngineShard {
303303
UringIoType::Write => {
304304
self.write_inflight += 1;
305305
// ensure only one buf
306-
opcode::Write::new(fd, ctx.w_bufs[0].as_ptr(), ctx.w_bufs[0].len() as _)
306+
opcode::Write::new(fd, ctx.w_bufs[0].ptr, ctx.w_bufs[0].len as _)
307307
.offset(ctx.addr.offset)
308308
.build()
309309
}
@@ -381,7 +381,16 @@ impl LocalIO for UringIo {
381381
let (tx, rx) = oneshot::channel();
382382
let tag = options.data.len();
383383
let shard = &self.write_txs[tag % self.write_txs.len()];
384-
let bufs = options.data.always_bytes();
384+
let bufs = options
385+
.data
386+
.always_bytes()
387+
.iter()
388+
.map(|x| x.as_ref())
389+
.map(|mut x| RawBuf {
390+
ptr: x.as_mut_ptr(),
391+
len: x.len() as _,
392+
})
393+
.collect();
385394

386395
let path = self.with_root(path);
387396
let path = Path::new(&path);

0 commit comments

Comments
 (0)