[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
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH V9 01/14] block: move bdrv_snapshot_find() to block/snapshot.c, (continued)
- [Qemu-devel] [PATCH V9 03/14] qemu-img: remove unused parameter in collect_image_info(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 05/14] block: add snapshot info query function bdrv_query_snapshot_info_list(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 04/14] block: move collect_snapshots() and collect_image_info() to block/qapi.c, Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 06/14] block: add check for VM snapshot in bdrv_query_snapshot_info_list(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 02/14] block: distinguish id and name in bdrv_find_snapshot(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images, Wenchao Xia, 2013/03/11
- Re: [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images,
Eric Blake <=
- [Qemu-devel] [PATCH V9 07/14] block: add image info query function bdrv_query_image_info(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 10/14] hmp: add function hmp_info_snapshots(), Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 08/14] qmp: add interface query-snapshots, Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 11/14] hmp: switch snapshot info function to qmp based one, Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 12/14] block: move dump_human_image_info() to block/qapi.c, Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 14/14] hmp: add command info images, Wenchao Xia, 2013/03/11
- [Qemu-devel] [PATCH V9 13/14] block: dump to buffer for bdrv_image_info_dump(), Wenchao Xia, 2013/03/11
- Re: [Qemu-devel] [PATCH V9 00/14] qmp/hmp interfaces for internal snapshot info, Stefan Hajnoczi, 2013/03/12