From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFWrK-0002vo-Jr for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:40:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFWil-0008Nd-RX for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:30:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFWil-0008NX-JL for qemu-devel@nongnu.org; Tue, 12 Mar 2013 17:26:55 -0400 Message-ID: <513F9D25.1050800@redhat.com> Date: Tue, 12 Mar 2013 15:24:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363000996-13221-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1363000996-13221-10-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1363000996-13221-10-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2RCEAPTNHJAEQXMHPCMCS" Subject: Re: [Qemu-devel] [PATCH V9 09/14] qmp: add interface query-images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2RCEAPTNHJAEQXMHPCMCS Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Wenchao Xia > --- > block/qapi.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++= +++ > qapi-schema.json | 33 ++++++++++++++++++++ > qmp-commands.hx | 90 ++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 3 files changed, 206 insertions(+), 0 deletions(-) >=20 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, fals= e 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2RCEAPTNHJAEQXMHPCMCS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRP50lAAoJEKeha0olJ0Nqf6YH/iI4BagyZ9+b3I/Q3NGNx3F0 tY3kvmTL6xX2zQ9jWHtdZE10TK1O73t8Iqx4MU+mq5YNjclD/FiAusWtiyyZtbWR agqe7Q+6Ho3aDBC0YjGcuZGzTBAjcLvOcfwU04x1aBsfa1T7WjzcJlU3N+gLUrQP lavuqtuVZlZYBirEK3/ejWtJD+PLp+ADvjEW3MaKly2qiEN9IIbfrYsPKV6hG4SG vLb29CYN9nfB3EOOo6ko/839DiulvvKyh3wE7VRNVuIGBQRp2ciBL7pl+CoOZVji C45irVaXDw2CR6weTZvOChu2huuSPZKhafMHyMwCZWVPq1/xfW8tbFPJ9sAzEAg= =XzPs -----END PGP SIGNATURE----- ------enig2RCEAPTNHJAEQXMHPCMCS--