[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH] dirty-bitmap: Expose persistent flag to 'query-
From: |
John Snow |
Subject: |
Re: [Qemu-block] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block' |
Date: |
Mon, 4 Feb 2019 14:59:48 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 2/4/19 11:09 AM, Eric Blake wrote:
> Since qemu currently doesn't flush persistent bitmaps to disk until
> shutdown (which might be MUCH later), it's useful if 'query-block'
> at least shows WHICH bitmaps will (eventually) make it to persistent
> storage.
>
> Signed-off-by: Eric Blake <address@hidden>
> ---
> qapi/block-core.json | 5 ++++-
> block/dirty-bitmap.c | 1 +
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index dae5c7b4d83..2e0bd3c245a 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -450,11 +450,14 @@
> #
> # @status: current status of the dirty bitmap (since 2.4)
> #
> +# @persistent: true if the bitmap will eventually be flushed to persistent
> +# storage (since 4.0)
> +#
> # Since: 1.3
> ##
> { 'struct': 'BlockDirtyInfo',
> 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32',
> - 'status': 'DirtyBitmapStatus'} }
> + 'status': 'DirtyBitmapStatus', 'persistent': 'bool' } }
>
> ##
> # @Qcow2BitmapInfoFlags:
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 00ea36f5545..e46f72b346c 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -440,6 +440,7 @@ BlockDirtyInfoList
> *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
> info->has_name = !!bm->name;
> info->name = g_strdup(bm->name);
> info->status = bdrv_dirty_bitmap_status(bm);
> + info->persistent = bm->persistent;
> entry->value = info;
> *plist = entry;
> plist = &entry->next;
>
Oh, this needs a change to 236, too.
--js