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

Eric Blake eblake at redhat.com
Thu Jun 20 21:33:11 UTC 2019


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.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190620/e2a4e6b5/attachment.sig>


More information about the Libguestfs mailing list