[Qemu-devel] [RFC PATCH v2 6/6] block/backup: prohibit backup from using in-use bitmaps

John Snow posted 6 patches 7 years, 4 months ago
There is a newer version of this series
[Qemu-devel] [RFC PATCH v2 6/6] block/backup: prohibit backup from using in-use bitmaps
Posted by John Snow 7 years, 4 months ago
If the bitmap is locked, we shouldn't touch it.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 blockdev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 651c50d1fa..1f03db0c3c 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3435,10 +3435,10 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn,
             bdrv_unref(target_bs);
             goto out;
         }
-        if (bdrv_dirty_bitmap_qmp_locked(bmap)) {
+        if (!bdrv_dirty_bitmap_user_modifiable(bmap)) {
             error_setg(errp,
-                       "Bitmap '%s' is currently locked and cannot be used for "
-                       "backup", backup->bitmap);
+                       "Bitmap '%s' is currently in-use by another operation and cannot be used for backup",
+                       backup->bitmap);
             goto out;
         }
     }
-- 
2.14.4