From patchwork Tue Apr 2 11:47:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 232977 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 69B302C012F for ; Tue, 2 Apr 2013 22:54:15 +1100 (EST) Received: from localhost ([::1]:58576 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMzn1-0008G1-49 for incoming@patchwork.ozlabs.org; Tue, 02 Apr 2013 07:54:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMzjE-000324-J4 for qemu-devel@nongnu.org; Tue, 02 Apr 2013 07:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UMzj8-0003wN-Lq for qemu-devel@nongnu.org; Tue, 02 Apr 2013 07:50:16 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:39067) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UMzj7-0003uk-V5 for qemu-devel@nongnu.org; Tue, 02 Apr 2013 07:50:10 -0400 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 2 Apr 2013 17:15:54 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp07.in.ibm.com (192.168.1.137) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 2 Apr 2013 17:15:53 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 74B7D1258052 for ; Tue, 2 Apr 2013 17:21:24 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r32Bo2Cm63963378 for ; Tue, 2 Apr 2013 17:20:02 +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 r32Bo4Yi003839 for ; Tue, 2 Apr 2013 11:50:04 GMT Received: from RH63Wenchao (wenchaox.cn.ibm.com [9.115.122.29]) by d28av01.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r32BlY3B025943; Tue, 2 Apr 2013 11:50:03 GMT From: Wenchao Xia To: qemu-devel@nongnu.org Date: Tue, 2 Apr 2013 19:47:23 +0800 Message-Id: <1364903250-10429-11-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1364903250-10429-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1364903250-10429-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13040211-8878-0000-0000-0000068B31A4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.7 Cc: kwolf@redhat.com, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH V11 10/17] 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 Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- block/qapi.c | 6 +++++- qapi-schema.json | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 5e91ab8..fa61c85 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -123,7 +123,11 @@ int bdrv_query_snapshot_info_list(BlockDriverState *bs, return 0; } -/* return 0 on success, and @p_info will be set only on success. */ +/* + * return 0 on success, and @p_info will be set only on success, + * (*pinfo)->has_backing_image will be false and (*pinfo)->backing_image will + * be NULL. + */ int bdrv_query_image_info(BlockDriverState *bs, ImageInfo **p_info, Error **errp) diff --git a/qapi-schema.json b/qapi-schema.json index 225afef..ad9dd82 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -233,6 +233,8 @@ # # @snapshots: #optional list of VM snapshots # +# @backing-image: #optional info of the backing image (since 1.5) +# # Since: 1.3 # ## @@ -242,7 +244,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: