* [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block'
@ 2019-02-04 16:09 Eric Blake
2019-02-04 16:23 ` Vladimir Sementsov-Ogievskiy
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Eric Blake @ 2019-02-04 16:09 UTC (permalink / raw)
To: qemu-devel
Cc: jsnow, qemu-block, andrey.shinkevich, vsementsov, Fam Zheng,
Kevin Wolf, Max Reitz, Markus Armbruster
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 <eblake@redhat.com>
---
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;
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block'
2019-02-04 16:09 [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block' Eric Blake
@ 2019-02-04 16:23 ` Vladimir Sementsov-Ogievskiy
2019-02-04 19:30 ` John Snow
2019-02-04 19:59 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2019-02-04 16:23 UTC (permalink / raw)
To: Eric Blake, qemu-devel@nongnu.org
Cc: jsnow@redhat.com, qemu-block@nongnu.org, Andrey Shinkevich,
Fam Zheng, Kevin Wolf, Max Reitz, Markus Armbruster
04.02.2019 19:09, 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 <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
--
Best regards,
Vladimir
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block'
2019-02-04 16:09 [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block' Eric Blake
2019-02-04 16:23 ` Vladimir Sementsov-Ogievskiy
@ 2019-02-04 19:30 ` John Snow
2019-02-04 19:59 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2019-02-04 19:30 UTC (permalink / raw)
To: Eric Blake, qemu-devel
Cc: qemu-block, andrey.shinkevich, vsementsov, Fam Zheng, Kevin Wolf,
Max Reitz, Markus Armbruster
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 <eblake@redhat.com>
Agree that we want this anyway.
Reviewed-by: John Snow <jsnow@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block'
2019-02-04 16:09 [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block' Eric Blake
2019-02-04 16:23 ` Vladimir Sementsov-Ogievskiy
2019-02-04 19:30 ` John Snow
@ 2019-02-04 19:59 ` John Snow
2 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2019-02-04 19:59 UTC (permalink / raw)
To: Eric Blake, qemu-devel
Cc: qemu-block, andrey.shinkevich, vsementsov, Fam Zheng, Kevin Wolf,
Max Reitz, Markus Armbruster
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 <eblake@redhat.com>
> ---
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-04 19:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-04 16:09 [Qemu-devel] [PATCH] dirty-bitmap: Expose persistent flag to 'query-block' Eric Blake
2019-02-04 16:23 ` Vladimir Sementsov-Ogievskiy
2019-02-04 19:30 ` John Snow
2019-02-04 19:59 ` John Snow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).