From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgDf0-00077e-Rn for qemu-devel@nongnu.org; Sat, 25 May 2013 08:33:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgDey-0004HK-Pc for qemu-devel@nongnu.org; Sat, 25 May 2013 08:33:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgDey-0004HE-HJ for qemu-devel@nongnu.org; Sat, 25 May 2013 08:33:20 -0400 Message-ID: <51A0AF8B.5050500@redhat.com> Date: Sat, 25 May 2013 06:33:15 -0600 From: Eric Blake MIME-Version: 1.0 References: <1369455886-30677-1-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1369455886-30677-1-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2XXSXRCOCRVACMMWSHKHI" Subject: Re: [Qemu-devel] [PATCH V13 0/6] enhancement for qmp/hmp interfaces of block info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, phrdina@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) ------enig2XXSXRCOCRVACMMWSHKHI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/24/2013 10:24 PM, Wenchao Xia wrote: The cover letter doesn't get committed into git; but if you do respin, it might be worth cleaning up some of the grammar. I know English is not your native language, and you're doing a fine job of coping as it is, but this might help you improve your skills. > This serial let qmp interface show delaied info, including internal s= napshot s/serial let/series lets/ not sure what word you meant for 'delaied' > /backing chain on all block device at runtime, which helps management s= tack and > human user, by retrieving exactly the same info of what qemu saws. s/saws/sees/ >=20 > Example: > -> { "execute": "query-block" } > <- { > "return":[ > { > "io-status": "ok", > "device":"ide0-hd0", > "locked":false, > "removable":false, > "inserted":{ > "ro":false, > "drv":"qcow2", > "encrypted":false, > "file":"disks/test.qcow2", Here... > "backing_file_depth":1, > "bps":1000000, > "bps_rd":0, > "bps_wr":0, > "iops":1000000, > "iops_rd":0, > "iops_wr":0, > "image":{ > "filename":"disks/test.qcow2", =2E..and here, it looks like we have redundant information. But that's okay; I think we're stuck with preserving backwards compatibility while still providing the new information in a saner structure. > "format":"qcow2", > "virtual-size":2048000, > "backing_file":"base.qcow2", > "full-backing-filename":"disks/base.qcow2", > "backing-filename-format:"qcow2", And here's another case of information... > "snapshots":[ > { > "id": "1", > "name": "snapshot1", > "vm-state-size": 0, > "date-sec": 10000200, > "date-nsec": 12, > "vm-clock-sec": 206, > "vm-clock-nsec": 30 > } > ], > "backing-image":{ > "filename":"disks/base.qcow2", > "format":"qcow2", =2E..that gets repeated later. Oh well. >=20 > These patches follows the rule that use qmp to retieve information, s/retieve/retrieve/ > hmp layer just does a translation from qmp object it got. To make code > graceful, snapshot and image info retrieving code in qemu and qemu-img = are > merged into block layer, and some function name was adjusted to make it= tips s/name was/names were/ > better. For the part touch by the serial, it works as: s/make it tips better/describe them better/ s/touch/touched/ s/serial/series/ >=20 > qemu qemu-img >=20 > dump_monitor dump_stdout > |--------------|=20 > | > block/qapi.c >=20 > Special thanks for Markus, Stefan, Kevin, Eric reviewing many times. >=20 > v13: > Renamed the serial as "enhancement for qmp/hmp interfaces of block in= fo". > Seperated the common part of code moving and hmp printf as a standalo= ne s/Seperated/Separated/ > serial, which can be used by both mine and Pavel's work. This serial de= pend s/serial/series/ > on it: "[PATCH V3 0/4] qapi and snapshot code clean up in block layer",= > https://lists.gnu.org/archive/html/qemu-devel/2013-05/msg03539.html > Removed the VM snapshot info part, since it relate to VM snapshot cre= ating > logic, which should be changed together with Pavel's serial. s/serial/series/ > Address Eric's comments: > 2/6: bdrv_query_image_info() returns void now, only use *errp to tip = error. s/tip/record/ >=20 > Wenchao Xia (6): > 1 block: add snapshot info query function bdrv_query_snapshot_info_li= st() > 2 block: add image info query function bdrv_query_image_info() > 3 qmp: add recursive member in ImageInfo > 4 qmp: add ImageInfo in BlockDeviceInfo used by query-block > 5 hmp: show ImageInfo in 'info block' > 6 hmp: add parameters device and -v for info block >=20 > block/qapi.c | 148 ++++++++++++++++++++++++++++++++++++++++++= -------- > hmp.c | 21 +++++++ > include/block/qapi.h | 14 +++-- > monitor.c | 7 ++- > qapi-schema.json | 10 +++- > qemu-img.c | 10 +++- > qmp-commands.hx | 69 +++++++++++++++++++++++- > 7 files changed, 242 insertions(+), 37 deletions(-) >=20 >=20 >=20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2XXSXRCOCRVACMMWSHKHI 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/ iQEcBAEBCAAGBQJRoK+MAAoJEKeha0olJ0NqsVEH/juo68PtExiDdpBGyT0De4RB 7YXIzdMDZejBggm8mznbBAjrBJTlXkQ5wj90CrpMxKbXxyNbu8Dwij7jIwN8Y1y+ imLUONecPAa3p3onVVzan5se3Giuhr/7CFTqM7bMaUnQk4usX6JUswuG8dvqP3ui 8A5rcIXwX+VL8EUqTuiTuntKndbqBaW5JLCdm+mLLec1TiGhz6WglqJnIuMA+vI7 mLP2GKwCSsSFpMp9xgWFisfBCvPJLnyLo2VEfEBvk+TQFJsHaI/s04XWqbu5VlZi jHtnU5kcO2WAwQYZaCBGPvyF0+nUzqB82sHFL5Hsj0qu5hIDSNtKghSQvOomdvI= =Uz1R -----END PGP SIGNATURE----- ------enig2XXSXRCOCRVACMMWSHKHI--