Blame SOURCES/kvm-block-backup-prohibit-backup-from-using-in-use-bitma.patch

7711c0
From 2b82b7986e02dfe32ed23724d7a6dfaef2c79031 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 6 Feb 2019 22:12:35 +0100
7711c0
Subject: [PATCH 25/33] block/backup: prohibit backup from using in use bitmaps
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190206221243.7407-16-jsnow@redhat.com>
7711c0
Patchwork-id: 84268
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 15/23] block/backup: prohibit backup from using in use bitmaps
7711c0
Bugzilla: 1658343
7711c0
RH-Acked-by: Thomas Huth <thuth@redhat.com>
7711c0
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
7711c0
If the bitmap is frozen, we shouldn't touch it.
7711c0
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Message-id: 20181002230218.13949-6-jsnow@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit b27a6b8b329a8dcbab9dc1af45586f7585f3d47b)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 blockdev.c | 12 ++++++------
7711c0
 1 file changed, 6 insertions(+), 6 deletions(-)
7711c0
7711c0
diff --git a/blockdev.c b/blockdev.c
7711c0
index 9921de6..c9bda43 100644
7711c0
--- a/blockdev.c
7711c0
+++ b/blockdev.c
7711c0
@@ -3669,10 +3669,10 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn,
7711c0
             bdrv_unref(target_bs);
7711c0
             goto out;
7711c0
         }
7711c0
-        if (bdrv_dirty_bitmap_qmp_locked(bmap)) {
7711c0
+        if (bdrv_dirty_bitmap_user_locked(bmap)) {
7711c0
             error_setg(errp,
7711c0
-                       "Bitmap '%s' is currently locked and cannot be used for "
7711c0
-                       "backup", backup->bitmap);
7711c0
+                       "Bitmap '%s' is currently in use by another operation"
7711c0
+                       " and cannot be used for backup", backup->bitmap);
7711c0
             goto out;
7711c0
         }
7711c0
     }
7711c0
@@ -3776,10 +3776,10 @@ BlockJob *do_blockdev_backup(BlockdevBackup *backup, JobTxn *txn,
7711c0
             error_setg(errp, "Bitmap '%s' could not be found", backup->bitmap);
7711c0
             goto out;
7711c0
         }
7711c0
-        if (bdrv_dirty_bitmap_qmp_locked(bmap)) {
7711c0
+        if (bdrv_dirty_bitmap_user_locked(bmap)) {
7711c0
             error_setg(errp,
7711c0
-                       "Bitmap '%s' is currently locked and cannot be used for "
7711c0
-                       "backup", backup->bitmap);
7711c0
+                       "Bitmap '%s' is currently in use by another operation"
7711c0
+                       " and cannot be used for backup", backup->bitmap);
7711c0
             goto out;
7711c0
         }
7711c0
     }
7711c0
-- 
7711c0
1.8.3.1
7711c0