diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2018-07-04 02:12:49 -0400 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2018-07-04 02:12:49 -0400 |
commit | 92bcea40d3aac62853e60426bd109b748d4d1cd2 (patch) | |
tree | 3d5589f7addd2a0afacab16f98407ae483dc6adb /block | |
parent | 79c2b203a932db5882a3f328db53e5a448cd47f9 (diff) | |
download | qemu-92bcea40d3aac62853e60426bd109b748d4d1cd2.zip qemu-92bcea40d3aac62853e60426bd109b748d4d1cd2.tar.gz qemu-92bcea40d3aac62853e60426bd109b748d4d1cd2.tar.bz2 |
block/dirty-bitmap: add bdrv_enable_dirty_bitmap_locked
Add _locked version of bdrv_enable_dirty_bitmap, to fix dirty bitmap
migration in the following patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20180625165745.25259-2-vsementsov@virtuozzo.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/dirty-bitmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index db1782e..93744b3 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -241,6 +241,12 @@ int bdrv_dirty_bitmap_create_successor(BlockDriverState *bs, return 0; } +void bdrv_enable_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap) +{ + assert(!bdrv_dirty_bitmap_frozen(bitmap)); + bitmap->disabled = false; +} + /* Called with BQL taken. */ void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap) { @@ -424,8 +430,7 @@ void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap) void bdrv_enable_dirty_bitmap(BdrvDirtyBitmap *bitmap) { bdrv_dirty_bitmap_lock(bitmap); - assert(!bdrv_dirty_bitmap_frozen(bitmap)); - bitmap->disabled = false; + bdrv_enable_dirty_bitmap_locked(bitmap); bdrv_dirty_bitmap_unlock(bitmap); } |