From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsnse-0003Rl-Hv for qemu-devel@nongnu.org; Wed, 09 Jan 2013 00:07:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tsnsa-0006Jh-KG for qemu-devel@nongnu.org; Wed, 09 Jan 2013 00:07:12 -0500 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:46710) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tsnsa-0006JS-0A for qemu-devel@nongnu.org; Wed, 09 Jan 2013 00:07:08 -0500 Received: from /spool/local by e28smtp01.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 Jan 2013 10:35:38 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 1F9863940050 for ; Wed, 9 Jan 2013 10:36:53 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0956pAl35848296 for ; Wed, 9 Jan 2013 10:36:51 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0956qV6017344 for ; Wed, 9 Jan 2013 16:06:52 +1100 From: Wenchao Xia Date: Wed, 9 Jan 2013 13:04:32 +0800 Message-Id: <1357707883-9182-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V2 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. 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(-)