[Libguestfs] [libnbd PATCH] docs: Improve nbd_aio_get_direction documentation

Richard W.M. Jones rjones at redhat.com
Tue Jun 25 09:08:33 UTC 2019


On Thu, Jun 20, 2019 at 04:33:11PM -0500, Eric Blake wrote:
> On 6/20/19 6:50 AM, Eric Blake wrote:
> > Mention things to remember for avoiding the deadlock of polling for a
> > POLLIN from a server that has no replies to send.
> > 
> > Perhaps we could split the READY state into two - one for when there
> > are no commands in flight (and get_direction returns 0 to state that
> > polling is pointless, although a multi-threaded reader can still poll
> > for POLLIN), and the other when there ARE commands in flight.  Such a
> > separation would also make it easier to know when nbd_aio_disconnect
> > is not going to strand an in-flight command's response. But I'm not
> > sure it is worth the effort.
> > ---
> > 
> > I'm pushing this one now, but sending the email because of the
> > question it raises on whether we want the user to be able to
> > distinguish a difference between any vs. no in-flight commands.
> 
> Actually, I'm not pushing it yet. I noticed that we can also return 0
> (such as on a just-created handle), and need to document that as well.

Patch is still good, with or without the extra documentation, so ACK
anyway.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list