[Libguestfs] nbd_aio_p{read,write} responsibilities

Abhay Raj Singh rathod.sahaab at gmail.com
Fri Jun 18 10:08:16 UTC 2021


I was going through the code and realized io_uring is similar to libev in
the way that we listen to the io events ourselves but the difference is
when we encounter the event we read it ourselves(io_uring), whereas in the
case of libev we ask libnbd to read it for us. We notify that the
connection is readable using ai_notify_read and the command is ran by the
state machine the command was queued by an earlier call to nbd_aio_pread.

My question is if we read from the socket using (let's say read[1]) what do
we need to do to inform the state machine we have done so, so that it can
function properly as I am assuming nbd_aio_pread modifies the state in some
way on enqueue and completion

Thanks and regards,
Abhay

---
[1]: io_uring has read but not recv in kernel 5.5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20210618/2098b297/attachment.htm>


More information about the Libguestfs mailing list