[libvirt] [PATCH] qemu: Report errors from iohelper

Eric Blake eblake at redhat.com
Thu Oct 25 21:56:48 UTC 2012


On 10/24/2012 09:49 AM, Michal Privoznik wrote:
> Currently, we use iohelper when saving/restoring a domain.
> However, if there's some kind of error (like I/O) it is not
> propagated to libvirt. Since it is not qemu who is doing
> the actual write() it will not get error. The iohelper does.
> Therefore we should check for iohelper errors as it makes
> libvirt more user friendly.
> ---
> 
> diff to v1:
> -incorporate the event loop to read iohelper's stderr
> @@ -3282,9 +3283,11 @@ doCoreDump(struct qemud_driver *driver,

>  
> +    /* deliberately don't use virCommandNonblockingFDs here as it is all or
> +     * nothing. And we want iohelper's stdin to block. */
> +    if (virSetNonBlock(ret->err_fd) < 0) {

This comment is confusing, since you say we don't use nonblocking and
then immediately set our side of stderr to nonblocking.  Maybe you meant
to say that we leave helper's stdin or stdout alone (default blocking)
because they are not tied to our event loop, but set our side of stderr
to be nonblocking so we can read it from our event loop.

ACK once you fix up that comment.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121025/60aa7b7f/attachment-0001.sig>


More information about the libvir-list mailing list