[Libguestfs] [nbdkit PATCH 3/4] nbd: Use libnbd 0.1

Richard W.M. Jones rjones at redhat.com
Fri May 31 08:43:16 UTC 2019


On Thu, May 30, 2019 at 02:00:48PM -0500, Eric Blake wrote:
> [...] which is more eassily explained by the
> serialization nature that libnbd is never read()ing from one thread at
> the same time another thread is write()ing.
>
> [...] libnbd
> works around that by using non-blocking sockets and prioritizing reads
> over writes rather than insisting on complete transactions).

Indeed, this is something that even a more complex state machine in
libnbd could not solve.  It fundamentally assumes that there is one
thread running the handle at any one time, but to both write to and
read from the socket simultaneously would require two threads.  That's
a large architectural change (I'm not even sure how to do it).

The question is whether this use case can be covered up by using
multi-conn, or if there's a requirement for parallel writes and reads
on the same socket.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list