On Sun, Jul 16, 2023 at 04:39:18PM +0000, Tage Johansson wrote:
> @@ -194,7 +198,10 @@ calls. The cookie is unique (per libnbd
handle) and E<ge> 1.
>
> You may register a function which is called when the command
> completes, see L</Completion callbacks> below. In this case we have
> -specified a null completion callback.
> +specified a null completion callback. If a completion callback is
> +specified, it will only be called if the asynchronous command was
> +sucessfully submitted (if the asynchronous API itself returns an
Should probably be "successfully" instead of "sucessfully".
> +error, there is nothing further to be completed).
>
> =back
>
> @@ -897,19 +904,25 @@ asynchronous commands are retired.
>
> =head2 Callbacks and locking
>
> -The callbacks are invoked at a point where the libnbd lock is held; as
> -such, it is unsafe for the callback to call any C<nbd_*> APIs on the
> -same nbd object, as it would cause deadlock.
> +The callbacks are invoked at a point where the libnbd lock is held,
> +typically during a call to C<nbd_aio_notify_read>,
> +C<nbd_aio_notify_write>, C<nbd_aio_poll>, or other call that can
> +advance libnbd's state machine. Depending on system load, it is even
> +possible for a callback to reached before completion of the
Shouldn't it be "to be reached" instead of "to reached"?
Yep on both counts; will fix. Thanks for a careful review.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization:
qemu.org |
libvirt.org