dirty-bitmap: Expose persistent flag to 'query-block'
PATCH 1/1 dirty-bitmap: Expose persistent flag to 'query-block'
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.
--- qapi/block-core.json | 5 ++++- block/dirty-bitmap.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)
qapi/block-core.json +4 -1
@@ -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:
block/dirty-bitmap.c +1 -0
@@ -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;
Signature · 1 line
2.20.1
Quoted 6 lines · Eric Blake
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 <[email protected]>
Signature · 2 lines
Best regards, Vladimir
Quoted 6 lines · Eric Blake
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 <[email protected]>
Agree that we want this anyway.
Quoted 37 lines · Eric Blake
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 <[email protected]>--- qapi/block-core.json | 5 ++++- block/dirty-bitmap.c | 1 + 2 files changed, 5 insertions(+), 1 deletion(-)qapi/block-core.json +4
-1@@ -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:block/dirty-bitmap.c +0
-0
block/dirty-bitmap.c BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs) · line 446
Quoted 7 lines
block/dirty-bitmap.c +1
-0@@ -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