|
|
ae23c9 |
From 238718e949e885a511fbc9c2486bddec78682341 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Date: Tue, 20 Nov 2018 18:18:20 +0000
|
|
|
ae23c9 |
Subject: [PATCH 26/35] block/backup: prohibit backup from using in use bitmaps
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Message-id: <20181120181828.15132-17-jsnow@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 83076
|
|
|
ae23c9 |
O-Subject: [RHEL8/rhel qemu-kvm PATCH 16/24] block/backup: prohibit backup from using in use bitmaps
|
|
|
ae23c9 |
Bugzilla: 1518989
|
|
|
ae23c9 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
If the bitmap is frozen, we shouldn't touch it.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
ae23c9 |
Message-id: 20181002230218.13949-6-jsnow@redhat.com
|
|
|
ae23c9 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit b27a6b8b329a8dcbab9dc1af45586f7585f3d47b)
|
|
|
ae23c9 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
blockdev.c | 12 ++++++------
|
|
|
ae23c9 |
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/blockdev.c b/blockdev.c
|
|
|
ae23c9 |
index 916153e..56a3d0f 100644
|
|
|
ae23c9 |
--- a/blockdev.c
|
|
|
ae23c9 |
+++ b/blockdev.c
|
|
|
ae23c9 |
@@ -3622,10 +3622,10 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn,
|
|
|
ae23c9 |
bdrv_unref(target_bs);
|
|
|
ae23c9 |
goto out;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
- if (bdrv_dirty_bitmap_qmp_locked(bmap)) {
|
|
|
ae23c9 |
+ if (bdrv_dirty_bitmap_user_locked(bmap)) {
|
|
|
ae23c9 |
error_setg(errp,
|
|
|
ae23c9 |
- "Bitmap '%s' is currently locked and cannot be used for "
|
|
|
ae23c9 |
- "backup", backup->bitmap);
|
|
|
ae23c9 |
+ "Bitmap '%s' is currently in use by another operation"
|
|
|
ae23c9 |
+ " and cannot be used for backup", backup->bitmap);
|
|
|
ae23c9 |
goto out;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
@@ -3730,10 +3730,10 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, JobTxn *txn,
|
|
|
ae23c9 |
error_setg(errp, "Bitmap '%s' could not be found", backup->bitmap);
|
|
|
ae23c9 |
goto out;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
- if (bdrv_dirty_bitmap_qmp_locked(bmap)) {
|
|
|
ae23c9 |
+ if (bdrv_dirty_bitmap_user_locked(bmap)) {
|
|
|
ae23c9 |
error_setg(errp,
|
|
|
ae23c9 |
- "Bitmap '%s' is currently locked and cannot be used for "
|
|
|
ae23c9 |
- "backup", backup->bitmap);
|
|
|
ae23c9 |
+ "Bitmap '%s' is currently in use by another operation"
|
|
|
ae23c9 |
+ " and cannot be used for backup", backup->bitmap);
|
|
|
ae23c9 |
goto out;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|