[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 08/17] block/dirty-bitmap: add bdrv_dirty_bitmap_rel
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH 08/17] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor |
Date: |
Tue, 7 Feb 2017 18:05:31 +0300 |
To just release successor and unfreeze bitmap without any additional
work.
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Signed-off-by: Denis V. Lunev <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
---
block/dirty-bitmap.c | 10 ++++++++++
include/block/dirty-bitmap.h | 2 ++
2 files changed, 12 insertions(+)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index ab2c7f5..32aa6eb 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -274,6 +274,16 @@ BdrvDirtyBitmap
*bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
return parent;
}
+void bdrv_dirty_bitmap_release_successor(BlockDriverState *bs,
+ BdrvDirtyBitmap *parent)
+{
+ BdrvDirtyBitmap *successor = parent->successor;
+
+ if (successor) {
+ bdrv_release_dirty_bitmap(bs, successor);
+ parent->successor = NULL;
+ }
+}
/**
* Truncates _all_ bitmaps attached to a BDS.
*/
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 57b476c..20b3ec7 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -20,6 +20,8 @@ BdrvDirtyBitmap *bdrv_dirty_bitmap_abdicate(BlockDriverState
*bs,
BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
BdrvDirtyBitmap *bitmap,
Error **errp);
+void bdrv_dirty_bitmap_release_successor(BlockDriverState *bs,
+ BdrvDirtyBitmap *bitmap);
void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
const char *name);
--
1.8.3.1
- [Qemu-block] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps, (continued)
- [Qemu-block] [PATCH 12/17] migration: add postcopy migration of dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 02/17] migration: fix ram_save_pending, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 13/17] iotests: add add_incoming_migration to VM class, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 06/17] block: add bdrv_dirty_bitmap_enable_successor(), Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 11/17] migration: add is_active_iterate handler, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 16/17] iotests: add dirty bitmap migration test, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 05/17] block: add bdrv_next_dirty_bitmap(), Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 15/17] iotests: add default node-name, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 14/17] qmp: add x-debug-block-dirty-bitmap-sha256, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 08/17] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor,
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH 03/17] migration: split common postcopy out of ram postcopy, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 09/17] migration: include migrate_dirty_bitmaps in migrate_postcopy, Vladimir Sementsov-Ogievskiy, 2017/02/07
- [Qemu-block] [PATCH 17/17] iotests: add dirty bitmap postcopy test, Vladimir Sementsov-Ogievskiy, 2017/02/07
- Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/17] Dirty bitmaps postcopy migration, Fam Zheng, 2017/02/13