diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/dirty-bitmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index a7eaa1051d..59b38b2671 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -413,18 +413,20 @@ void bdrv_remove_persistent_dirty_bitmap(BlockDriverState *bs, } } -/* Called with BQL taken. */ void bdrv_disable_dirty_bitmap(BdrvDirtyBitmap *bitmap) { + bdrv_dirty_bitmap_lock(bitmap); assert(!bdrv_dirty_bitmap_frozen(bitmap)); bitmap->disabled = true; + bdrv_dirty_bitmap_unlock(bitmap); } -/* Called with BQL taken. */ void bdrv_enable_dirty_bitmap(BdrvDirtyBitmap *bitmap) { + bdrv_dirty_bitmap_lock(bitmap); assert(!bdrv_dirty_bitmap_frozen(bitmap)); bitmap->disabled = false; + bdrv_dirty_bitmap_unlock(bitmap); } BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs) |