From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVf1g-0000nS-Ve for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVf1f-0007Bu-NG for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:33:08 -0400 Received: from e23smtp02.au.ibm.com ([202.81.31.144]:54052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVf1f-0007BZ-5V for qemu-devel@nongnu.org; Fri, 26 Apr 2013 05:33:07 -0400 Received: from /spool/local by e23smtp02.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 26 Apr 2013 19:25:07 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id E68622CE804D for ; Fri, 26 Apr 2013 19:32:59 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3Q9JC6118874574 for ; Fri, 26 Apr 2013 19:19:13 +1000 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3Q9Wvcs006339 for ; Fri, 26 Apr 2013 19:32:58 +1000 From: Wenchao Xia Date: Fri, 26 Apr 2013 17:31:08 +0800 Message-Id: <1366968675-1451-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 0/7] qapi and snapshot code clean up in block layer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, phrdina@redhat.com, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia These patches are the common part of my hmp/qmp block query series and Pavel's qmp snapshot command converion series. It mainly does following things: 1 move snapshot related code to block/snapshot.c, qmp and info dumping code to block/qapi.c. 2 better bdrv_snapshot_find(). 3 better info dumping function to get rid of buffer, avoid string truncation. Note patch 2 and 3, 5 and 6 can be squashed. Sperating them to make review easier, since some code is already reviewed before. Stefan Hajnoczi (1): 1 block: drop bs_snapshots global variable Wenchao Xia (6): 2 block: move bdrv_snapshot_find() to block/snapshot.c 3 block: move snapshot code in block.c to block/snapshot.c 4 block: distinguish id and name in bdrv_find_snapshot() 5 block: move collect_snapshots() and collect_image_info() to block/qapi.c 6 block: move qmp and info dump related code to block/qapi.c 7 block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump() block.c | 318 ------------------------------------- block/Makefile.objs | 1 + block/qapi.c | 362 +++++++++++++++++++++++++++++++++++++++++++ block/snapshot.c | 212 +++++++++++++++++++++++++ include/block/block.h | 29 +---- include/block/block_int.h | 1 + include/block/qapi.h | 41 +++++ include/block/snapshot.h | 55 +++++++ include/qemu/error-report.h | 1 + qemu-img.c | 163 +------------------ savevm.c | 75 ++++----- util/qemu-error.c | 18 ++ 12 files changed, 735 insertions(+), 541 deletions(-) create mode 100644 block/qapi.c create mode 100644 block/snapshot.c create mode 100644 include/block/qapi.h create mode 100644 include/block/snapshot.h