From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TueDZ-0001js-Lw for qemu-devel@nongnu.org; Mon, 14 Jan 2013 02:12:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TueD8-0006ES-Oo for qemu-devel@nongnu.org; Mon, 14 Jan 2013 02:12:25 -0500 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:33517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TueD7-0006Cp-P2 for qemu-devel@nongnu.org; Mon, 14 Jan 2013 02:11:58 -0500 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Jan 2013 12:40:20 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id A6A1D3940058 for ; Mon, 14 Jan 2013 12:41:48 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0E7Bkra37486772 for ; Mon, 14 Jan 2013 12:41:47 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0E7Bljt004175 for ; Mon, 14 Jan 2013 07:11:47 GMT From: Wenchao Xia Date: Mon, 14 Jan 2013 15:09:36 +0800 Message-Id: <1358147387-8221-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V3 00/11] add qmp/hmp interfaces for snapshot info List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, phrdina@redhat.com, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, 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. Wenchao Xia (11): qemu-img: remove unused parameter in collect_image_info() block: add bdrv_get_filename() function block: add snapshot and image info query function qemu-img: switch image retrieving function block: rename bdrv_query_info to bdrv_query_block_info qmp: add interface query-images. block: export function bdrv_find_snapshot() qmp: add interface query-snapshots hmp: export function hmp_handle_error() hmp: retrieve info from qmp for snapshot info hmp: show snapshot on single block device block.c | 200 ++++++++++++++++++++++++++++++++++++++++++++++++- hmp.c | 2 +- hmp.h | 2 + include/block/block.h | 14 +++- monitor.c | 6 +- qapi-schema.json | 40 ++++++++++ qemu-img.c | 87 +--------------------- qmp-commands.hx | 129 +++++++++++++++++++++++++++++++ savevm.c | 137 +++++++++++++++++---------------- 9 files changed, 458 insertions(+), 159 deletions(-)