From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxB4j-0004JM-Bc for qemu-devel@nongnu.org; Mon, 21 Jan 2013 01:41:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TxAwz-0001pn-Ip for qemu-devel@nongnu.org; Mon, 21 Jan 2013 01:33:47 -0500 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:46279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TxAwz-0001ic-1H for qemu-devel@nongnu.org; Mon, 21 Jan 2013 01:33:45 -0500 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Jan 2013 16:15:38 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 878822BB0050 for ; Mon, 21 Jan 2013 17:23:30 +1100 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0L6BZee62914746 for ; Mon, 21 Jan 2013 17:11:37 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0L6NSQ6027388 for ; Mon, 21 Jan 2013 17:23:28 +1100 Message-ID: <50FCDE5E.1070904@linux.vnet.ibm.com> Date: Mon, 21 Jan 2013 14:21:18 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1358408410-22187-1-git-send-email-xiawenc@linux.vnet.ibm.com> In-Reply-To: <1358408410-22187-1-git-send-email-xiawenc@linux.vnet.ibm.com> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V4 00/13] add qmp/hmp interfaces for snapshot info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: aliguori@us.ibm.com, phrdina@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com, lcapitulino@redhat.com ÓÚ 2013-1-17 15:39, Wenchao Xia дµÀ: > This serial of patches does two things: merge some info code > in qemu-img, and add following interfaces: > 1) qmp: query-images > 2) qmp: query-snapshots > 3) hmp: show snapshot info on a single block device > These patches follows the rule that use qmp to retieve information, > hmp layer just do a translation from qmp object it got, so almost > every hmp interface may have a correlated qmp interface. > To make code graceful, snapshot retrieving code in qemu and qemu-img > are merged into block.c, and some function name was adjusted to make it > tips better. Now it works as: > > qemu qemu-img > > dump_monitor dump_stdout > |--------------| > | > qmp > | > block > > Note: > Last two patches need previous sent patches which extend hmp sub command, at: > http://lists.nongnu.org/archive/html/qemu-devel/2012-12/msg03487.html > > v2: > Rename and adjusted qmp interface according to comments from Eric. > Spelling fix. > Information retrieving function in block layer goes to seperated patch. > Free qmp object after usage in hmp. > Added counterpart in qmp-commands.hx. > Better tips in qmp-schema.json. > > v3: > Spelling fix in commit message, patch 03/11. > Spelling fix in code, patch 06/11. > Add comments that vm-state-size is in bytes, and change size of it in > example to a reasonable number, patch 08/11. > > v4: > 02/13: in bdrv_get_filename(), add const to parameter *bs. > 03/13: new added, in which the function correct the behavior in info > retrieving. > 04/13: in bdrv_query_snapshot_infolist(), remove NULL check before call > err_setg(), added TODO comments that let block layer function set error instead > of this layer to tip better for errors, Split out patch about image info to > patch 05/13. > 05/13: new splitted, and it checks *bs by calling bdrv_can_read_snapshot() > before collect internal snasphot info to avoid *err is set unexpectly now. > 06/13: check if error happens after calling bdrv_query_image_info(). > 08/13: rename info to image in DeviceImageInfo and make it optional, > when device is not inserted it will be empty, added error handling code > when met error in calling block layer API. > 09/13: distinguish *id and *name in bdrv_find_snapshots(), caller > can choose what to search with. id_wellformed() should be called in > new snapshot creation interface above this function in the future. > 10/13: now this interface have addtional parameter *device, which > enable showing internal snapshots on a single device. Also use > bdrv_can_read_snapshot() instead of bdrv_can_snapshot() now. > 11/13: this function goes to hmp.c so hmp_handler_error is not exported > any more, split out patch that switch snapshot info function to patch 12/13. > 12/13: new splitted. > 13/13: use qmp API instead of directly calling block layer API, now > all hmp function have correspond qmp funtion in this serial. > > Wenchao Xia (13): > 1 qemu-img: remove unused parameter in collect_image_info() > 2 block: add bdrv_get_filename() function > 3 block: add bdrv_can_read_snapshot() function > 4 block: add snapshot info query function bdrv_query_snapshot_infolist() > 5 block: add image info query function bdrv_query_image_info() > 6 qemu-img: switch image retrieving function > 7 block: rename bdrv_query_info to bdrv_query_block_info > 8 qmp: add interface query-images. > 9 block: export function bdrv_find_snapshot() > 10 qmp: add interface query-snapshots > 11 hmp: add function hmp_info_snapshots() > 12 hmp: switch snapshot info function to qmp based one > 13 hmp: show snapshots on single block device > > block.c | 274 ++++++++++++++++++++++++++++++++++++++++++++++++- > hmp.c | 47 +++++++++ > hmp.h | 1 + > include/block/block.h | 14 +++- > monitor.c | 8 +- > qapi-schema.json | 46 ++++++++ > qemu-img.c | 91 +--------------- > qmp-commands.hx | 129 +++++++++++++++++++++++ > savevm.c | 94 +---------------- > 9 files changed, 522 insertions(+), 182 deletions(-) > > Hi all, any more comments for this serial? -- Best Regards Wenchao Xia