From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLcgD-0005P0-Gn for qemu-devel@nongnu.org; Wed, 11 Feb 2015 14:10:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLcgA-0007SA-6P for qemu-devel@nongnu.org; Wed, 11 Feb 2015 14:10:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37512) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLcg9-0007S1-T3 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 14:10:30 -0500 Message-ID: <54DBA923.1090006@redhat.com> Date: Wed, 11 Feb 2015 14:10:27 -0500 From: Max Reitz MIME-Version: 1.0 References: <1423532117-14490-1-git-send-email-jsnow@redhat.com> <1423532117-14490-11-git-send-email-jsnow@redhat.com> In-Reply-To: <1423532117-14490-11-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v12 10/17] qmp: Add dirty bitmap status fields in query-block List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com On 2015-02-09 at 20:35, John Snow wrote: > Adds the "disabled" and "frozen" status booleans. > > Signed-off-by: Fam Zheng > Signed-off-by: John Snow > --- > block.c | 2 ++ > qapi/block-core.json | 7 ++++++- > 2 files changed, 8 insertions(+), 1 deletion(-) > > diff --git a/block.c b/block.c > index ad33d96..3c0989c 100644 > --- a/block.c > +++ b/block.c > @@ -5564,6 +5564,8 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs) > info->granularity = bdrv_dirty_bitmap_granularity(bm); > info->has_name = !!bm->name; > info->name = g_strdup(bm->name); > + info->disabled = bm->disabled; Hm, this is different than !bdrv_dirty_bitmap_enabled(), but I can understand the reasoning if the difference is intended. Therefore, as long as it's intended: Reviewed-by: Max Reitz > + info->frozen = bdrv_dirty_bitmap_frozen(bm); > entry->value = info; > *plist = entry; > plist = &entry->next; > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 702b76a..c5d5563 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -332,10 +332,15 @@ > # > # @granularity: granularity of the dirty bitmap in bytes (since 1.4) > # > +# @disabled: whether the dirty bitmap is disabled (Since 2.3) > +# > +# @frozen: whether the dirty bitmap is frozen (Since 2.3) > +# > # Since: 1.3 > ## > { 'type': 'BlockDirtyInfo', > - 'data': {'*name': 'str', 'count': 'int', 'granularity': 'int'} } > + 'data': {'*name': 'str', 'count': 'int', 'granularity': 'int', > + 'disabled': 'bool', 'frozen': 'bool'} } > > ## > # @BlockInfo: