[Libguestfs] [libnbd PATCH v2 2/5] states: Wire in a read callback

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


On Thu, Jun 20, 2019 at 08:45:05PM -0500, Eric Blake wrote:
> If any callback fails, and if no prior error was set, then the
> callback's failure becomes the failure reason for the overall
> read. (Note that this is different from the block status callback,
> which for now quits using the callback on subsequent chunks if an
> earlier chunk failed - we may decide to change one or the other for
> consistency before the API is stable.)
> 
> Nothing actually passes a callback function yet, so for now this is no
> functional change; but this will make it possible for the next patch
> to add an 'nbd_aio_pread_structred' API.

I don't think non-C callbacks will be able to reliably set errno, but
that's something we can solve in future.  Therefore ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list