Please enable JavaScript.
Coggle requires JavaScript to display documents.
libublk-rs IO handling re-thinking - Coggle Diagram
libublk-rs IO handling re-thinking
facts
io_uring
IoUring::completion(&mut self)
IoUring::submission(&mut self)
IoUring::submit_and_wait(&self, usize)
UblkQueue
mutable parts
ios
io.flags
io_uring
cmd_inflights
q_state
idea
pass (mut &)IoUring and remove FnMut()
replace FnMut() with (mut &)IoUring
return IO command by iterator
anything can be built from queue & CQE
background
mutable iterator vs iterator
readable iter
by copying one CQE?
mut& UblkQueue -> &UblkQueue
or add one mutable queue_data
IoUring
ios
cmd_flight
q_state
then UblkQueue is readonly
related fields
q_state
cmd_inflight
ios
may be done in FnMut way
by passing UblkQueue, io_uring references to closure
cqe iterator
ring.completion().map(Into::into).collect()
abstract ublk_uring
move mutable stuff into ublk_uring
ublk_queue is totally immutable
background