From patchwork Sat May 25 04:24:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 246318 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 03F6B2C02A9 for ; Sat, 25 May 2013 14:29:14 +1000 (EST) Received: from localhost ([::1]:32902 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug66S-0001vx-73 for incoming@patchwork.ozlabs.org; Sat, 25 May 2013 00:29:12 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug643-0006Xh-2r for qemu-devel@nongnu.org; Sat, 25 May 2013 00:26:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ug63y-0008H6-BI for qemu-devel@nongnu.org; Sat, 25 May 2013 00:26:43 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:46381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug63x-0008Gq-On for qemu-devel@nongnu.org; Sat, 25 May 2013 00:26:38 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 25 May 2013 09:49:14 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 25 May 2013 09:49:13 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id AF522E0054 for ; Sat, 25 May 2013 09:59:08 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r4P4QPSL59900136 for ; Sat, 25 May 2013 09:56:25 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r4P4QW8K007816 for ; Sat, 25 May 2013 14:26:32 +1000 Received: from RH63Wenchao.localdomain ([9.77.178.167]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r4P4OQYf003205; Sat, 25 May 2013 14:26:29 +1000 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Sat, 25 May 2013 12:24:43 +0800 Message-Id: <1369455886-30677-4-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1369455886-30677-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1369455886-30677-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13052504-2000-0000-0000-00000C3E8934 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.8 Cc: kwolf@redhat.com, phrdina@redhat.com, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH V13 3/6] qmp: add recursive member in ImageInfo X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org New member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia --- block/qapi.c | 16 +++++++++++++++- qapi-schema.json | 5 ++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 680ec23..cbef584 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -88,7 +88,21 @@ int bdrv_query_snapshot_info_list(BlockDriverState *bs, return 0; } -/* @p_info will be set only on success. */ +/** + * bdrv_query_image_info: + * @bs: block device to examine + * @p_info: location to store image information + * @errp: location to store error information + * + * Store "flat" image inforation in @p_info. + * + * "Flat" means it does *not* query backing image information, + * i.e. (*pinfo)->has_backing_image will be set to false and + * (*pinfo)->backing_image to NULL even when the image does in fact have + * a backing image. + * + * @p_info will be set only on success. On error, store error in @errp. + */ void bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, Error **errp) diff --git a/qapi-schema.json b/qapi-schema.json index ef1f657..a02999d 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -236,6 +236,8 @@ # # @snapshots: #optional list of VM snapshots # +# @backing-image: #optional info of the backing image (since 1.6) +# # Since: 1.3 # ## @@ -245,7 +247,8 @@ '*actual-size': 'int', 'virtual-size': 'int', '*cluster-size': 'int', '*encrypted': 'bool', '*backing-filename': 'str', '*full-backing-filename': 'str', - '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } } + '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'], + '*backing-image': 'ImageInfo' } } ## # @ImageCheck: