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 <xiaw...@linux.vnet.ibm.com> > --- > 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