[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v16 22/22] qmp: block-dirty-bitmap-remove: remove pe
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH v16 22/22] qmp: block-dirty-bitmap-remove: remove persistent |
Date: |
Sat, 25 Feb 2017 20:07:58 +0300 |
Remove persistent bitmap from the storage on block-dirty-bitmap-remove.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
---
blockdev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index c41b791289..a365cdf3ed 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2767,6 +2767,7 @@ void qmp_block_dirty_bitmap_remove(const char *node,
const char *name,
AioContext *aio_context;
BlockDriverState *bs;
BdrvDirtyBitmap *bitmap;
+ Error *local_err = NULL;
bitmap = block_dirty_bitmap_lookup(node, name, &bs, &aio_context, errp);
if (!bitmap || !bs) {
@@ -2779,6 +2780,15 @@ void qmp_block_dirty_bitmap_remove(const char *node,
const char *name,
name);
goto out;
}
+
+ if (bdrv_dirty_bitmap_get_persistance(bitmap)) {
+ bdrv_remove_persistent_dirty_bitmap(bs, name, &local_err);
+ if (local_err != NULL) {
+ error_propagate(errp, local_err);
+ goto out;
+ }
+ }
+
bdrv_dirty_bitmap_make_anon(bitmap);
bdrv_release_dirty_bitmap(bs, bitmap);
--
2.11.1
- [Qemu-block] [PATCH v16 00/22] qcow2: persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 22/22] qmp: block-dirty-bitmap-remove: remove persistent,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH v16 01/22] specs/qcow2: fix bitmap granularity qemu-specific note, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 19/22] iotests: test qcow2 persistent dirty bitmap, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 20/22] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 12/22] block/dirty-bitmap: add bdrv_dirty_bitmap_next(), Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 03/22] hbitmap: improve dirty iter, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 04/22] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 21/22] qcow2: add .bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 07/22] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 06/22] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2017/02/25
- [Qemu-block] [PATCH v16 05/22] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2017/02/25