qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 02/36] qerror/block: introduce QERR_BLOCK_JO


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH 02/36] qerror/block: introduce QERR_BLOCK_JOB_NOT_ACTIVE
Date: Fri, 15 Jun 2012 10:51:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

On 06/15/2012 09:05 AM, Paolo Bonzini wrote:
> The DeviceNotActive error is not a particularly good match, add
> a separate one.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  blockdev.c       |    4 ++--
>  qapi-schema.json |    5 ++---
>  qerror.c         |    4 ++++
>  qerror.h         |    3 +++
>  4 files changed, 11 insertions(+), 5 deletions(-)

Looks reasonable, but it will affect libvirt:  Right now, libvirt parses
the particular return code (qemu_monitor.c:qemuMonitorJSONBlockJob), and
translates

DeviceNotActive => "No active operation on device"
...
all others => "Unexpected error"

so if this patch goes in but libvirt doesn't match, then libvirt will
have a regression in error message quality.  Not the end of the world,
though, so don't hold back just because of libvirt.

Reviewed-by: Eric Blake <address@hidden>

> @@ -1679,8 +1679,7 @@
>  # @device: the device name
>  #
>  # Returns: Nothing on success
> -#          If no background operation is active on this device, 
> DeviceNotActive
> -#          If cancellation already in progress, DeviceInUse
> +#          If no background operation is active on this device, 
> BlockJobNotActive

What happened to DeviceInUse?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]