From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQAeW-0007aM-2a for qemu-devel@nongnu.org; Thu, 11 Apr 2013 02:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UQAeU-0007oj-VU for qemu-devel@nongnu.org; Thu, 11 Apr 2013 02:06:32 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:53909) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UQAeU-0007oO-9q for qemu-devel@nongnu.org; Thu, 11 Apr 2013 02:06:30 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Apr 2013 11:31:39 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 12DBC125804E for ; Thu, 11 Apr 2013 11:37:48 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3B66INt1311098 for ; Thu, 11 Apr 2013 11:36:19 +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 r3B66LhK004252 for ; Thu, 11 Apr 2013 16:06:21 +1000 Message-ID: <516652CB.2010902@linux.vnet.ibm.com> Date: Thu, 11 Apr 2013 14:06:03 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1364903250-10429-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1364903250-10429-11-git-send-email-xiawenc@linux.vnet.ibm.com> <871uaixtd1.fsf@blackfin.pond.sub.org> In-Reply-To: <871uaixtd1.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V11 10/17] qmp: add recursive member in ImageInfo List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, stefanha@gmail.com, pbonzini@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com ÓÚ 2013-4-11 0:06, Markus Armbruster дµÀ: > Wenchao Xia writes: > >> 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. >> + */ > > Sounds like this function computes incomplete ImageInfo. Correct? If > yes, why? > yes, qemu-img will use it to get info of an image that may be broken in backing file chain(can't get backing file's info). >> 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: > -- Best Regards Wenchao Xia