qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images
Date: Tue, 12 Mar 2013 15:24:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130219 Thunderbird/17.0.3

On 03/11/2013 05:23 AM, Wenchao Xia wrote:
>   This mirror function will return image info including snapshots,
> and if specified backing image's info will also be returned. Now
> Qemu have both query-images and query-block interfaces.

In the middle of a sentence, we prefer QEMU or qemu, not Qemu.

> 
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
>  block/qapi.c     |   83 +++++++++++++++++++++++++++++++++++++++++++++++++
>  qapi-schema.json |   33 ++++++++++++++++++++
>  qmp-commands.hx  |   90 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 206 insertions(+), 0 deletions(-)
> 

As pointed out at the top level, why do we need a new command?  Could
query-devices be enhanced instead to provide this information as
additional dictionary members, so that a single query provides entire
backing chain and internal snapshot data alongside everything else?

>  ##
> +# @query-images:
> +#
> +# Get block device image information
> +#
> +# @device: #optional the name of the device to get image info from. If not
> +#          specified, all block devices will be queried

Even if we decide to add a new command, I still think this is overkill
for QMP.  Just return the data on all the devices, all the time.

> +# @backing: #optional true to show information on backing images, false or
> +#          omitted to show just the top image of a block device

Likewise.  Calling apps can filter out what they need, without you
having to add filtering into the qmp code.  HMP can do filtering, since
it is supposed to be human-friendly, but I don't see a reason to make
QMP give reduced information.

-- 
Eric Blake   eblake redhat com    +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]