summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy2018-03-13 20:33:59 +0100
committerJohn Snow2018-03-13 20:33:59 +0100
commite73a265e9f0fe4dfa376bffe78f121b85c7a5a03 (patch)
tree2690c3c7c839439dfd07b207eb3cf69df67d628b /block
parentMerge remote-tracking branch 'remotes/ehabkost/tags/python-next-pull-request'... (diff)
downloadqemu-e73a265e9f0fe4dfa376bffe78f121b85c7a5a03.tar.gz
qemu-e73a265e9f0fe4dfa376bffe78f121b85c7a5a03.tar.xz
qemu-e73a265e9f0fe4dfa376bffe78f121b85c7a5a03.zip
block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()
Enabling bitmap successor is necessary to enable successors of bitmaps being migrated before target vm start. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Message-id: 20180207155837.92351-2-vsementsov@virtuozzo.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/dirty-bitmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 909f0517f8..0d0e807216 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -234,6 +234,14 @@ int bdrv_dirty_bitmap_create_successor(BlockDriverState *bs,
return 0;
}
+/* Called with BQL taken. */
+void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap)
+{
+ qemu_mutex_lock(bitmap->mutex);
+ bdrv_enable_dirty_bitmap(bitmap->successor);
+ qemu_mutex_unlock(bitmap->mutex);
+}
+
/**
* For a bitmap with a successor, yield our name to the successor,
* delete the old bitmap, and return a handle to the new bitmap.