From 993edc0ce0c6f44deb8272a7a857e419417f5f84 Mon Sep 17 00:00:00 2001 From: John Snow Date: Mon, 29 Oct 2018 16:23:16 -0400 Subject: block/dirty-bitmaps: add user_locked status checker Instead of both frozen and qmp_locked checks, wrap it into one check. frozen implies the bitmap is split in two (for backup), and shouldn't be modified. qmp_locked implies it's being used by another operation, like being exported over NBD. In both cases it means we shouldn't allow the user to modify it in any meaningful way. Replace any usages where we check both frozen and qmp_locked with the new check. Signed-off-by: John Snow Reviewed-by: Eric Blake Message-id: 20181002230218.13949-2-jsnow@redhat.com [w/edits Suggested-By: Vladimir Sementsov-Ogievskiy ] Signed-off-by: John Snow --- include/block/dirty-bitmap.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h index 201ff7f20b..14639439a2 100644 --- a/include/block/dirty-bitmap.h +++ b/include/block/dirty-bitmap.h @@ -94,6 +94,7 @@ bool bdrv_has_readonly_bitmaps(BlockDriverState *bs); bool bdrv_dirty_bitmap_get_autoload(const BdrvDirtyBitmap *bitmap); bool bdrv_dirty_bitmap_get_persistance(BdrvDirtyBitmap *bitmap); bool bdrv_dirty_bitmap_qmp_locked(BdrvDirtyBitmap *bitmap); +bool bdrv_dirty_bitmap_user_locked(BdrvDirtyBitmap *bitmap); bool bdrv_has_changed_persistent_bitmaps(BlockDriverState *bs); BdrvDirtyBitmap *bdrv_dirty_bitmap_next(BlockDriverState *bs, BdrvDirtyBitmap *bitmap); -- cgit v1.2.3-55-g7522