[libvirt] [PATCH] blockjob: Fix a error checking of blockjob status in some case

Eric Blake eblake at redhat.com
Wed Jan 31 15:00:53 UTC 2018


On 01/31/2018 08:56 AM, John Ferlan wrote:
> 
> 
> On 01/19/2018 09:03 AM, Jie Wang wrote:
>> offset and len can also be equal to 0 on failed if blockjob return
>> status:"BLOCK_JOB_COMPLETED" with error:"File descriptor in bad
>> state", this bug can be reproduced easily if you perform a async
>> block job on read only filesystem, so it's very worthwhile for us to
>> check 'error' in this case.
> 
> Perhaps better said:
> 
> 
> Commit id 'bc444666f' added a check if the returned data buffer had an
> error, but failed to adjust the event from
> VIR_DOMAIN_BLOCK_JOB_COMPLETED to VIR_DOMAIN_BLOCK_JOB_FAILED in order
> to propagate an error such as "File descriptor in bad state" that may be
> returned from QEMU when both @offset and @len are set to 0 such as is
> the case when performing an async block job read on a read only filesystem.
> 
> If that adjustment is fine with you and anyone else that cares to read
> this response, then I'll make the adjustment and push...
> 
> Reviewed-by: John Ferlan <jferlan at redhat.com>

Works for me as well.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

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


More information about the libvir-list mailing list