[Libguestfs] [PATCH libnbd] lib: Remove cookie parameter from completion callbacks.
Eric Blake
eblake at redhat.com
Tue Jul 30 16:27:12 UTC 2019
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
-------------- 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/20190730/2d99889c/attachment.sig>
More information about the Libguestfs
mailing list