On 7/30/19 11:21 AM, Eric Blake wrote:
> @@ -1782,8 +1784,11 @@ documented in
C<nbd_pread_structured>.";
> longdesc = "\
> Issue a read command to the NBD server. This returns the
> unique positive 64 bit cookie for this command, or C<-1> on
> -error. If this command returns a cookie, then C<callback>
> +error.
> +
> +When the command completes, C<callback>
> will be invoked as described in L<libnbd(3)/Completion callbacks>.
> +
Do we need wording anywhere (probably in the .pod, so we only state it
once) that mentions that the callback routine is not invoked if
nbd_aio_FOO_callback returns -1?
Oh - that made me think. Now that we promise to invoke callback(FREE)
after we are done using it, maybe we SHOULD guarantee that we use
callback(FREE) even when returning -1? We could use stronger
definitions of what lifetimes to expect on the error paths.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org