Blame SOURCES/kvm-block-dirty-bitmaps-prohibit-readonly-bitmaps-for-ba.patch

7711c0
From 259fa803d7b12cda535e1c115e3757bc58131acf Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 3 Apr 2019 18:18:52 +0200
7711c0
Subject: [PATCH 147/163] block/dirty-bitmaps: prohibit readonly bitmaps for
7711c0
 backups
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190403181857.9693-17-jsnow@redhat.com>
7711c0
Patchwork-id: 85418
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 16/21] block/dirty-bitmaps: prohibit readonly bitmaps for backups
7711c0
Bugzilla: 1677073
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
7711c0
7711c0
drive and blockdev backup cannot use readonly bitmaps, because the
7711c0
sync=incremental mechanism actually edits the bitmaps on success.
7711c0
7711c0
If you really want to do this operation, use a copied bitmap.
7711c0
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Reviewed-by: Eric Blake <eblake@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Message-id: 20190301191545.8728-5-jsnow@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit a54a0c113b333aee49e484758fab7f1f1c593dd3)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 blockdev.c | 4 ++--
7711c0
 1 file changed, 2 insertions(+), 2 deletions(-)
7711c0
7711c0
diff --git a/blockdev.c b/blockdev.c
7711c0
index 860cea6..de8a2bf 100644
7711c0
--- a/blockdev.c
7711c0
+++ b/blockdev.c
7711c0
@@ -3684,7 +3684,7 @@ static BlockJob *do_drive_backup(DriveBackup *backup, JobTxn *txn,
7711c0
             bdrv_unref(target_bs);
7711c0
             goto out;
7711c0
         }
7711c0
-        if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_ALLOW_RO, errp)) {
7711c0
+        if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_DEFAULT, errp)) {
7711c0
             goto out;
7711c0
         }
7711c0
     }
7711c0
@@ -3788,7 +3788,7 @@ 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_check(bmap, BDRV_BITMAP_ALLOW_RO, errp)) {
7711c0
+        if (bdrv_dirty_bitmap_check(bmap, BDRV_BITMAP_DEFAULT, errp)) {
7711c0
             goto out;
7711c0
         }
7711c0
     }
7711c0
-- 
7711c0
1.8.3.1
7711c0