Blame SOURCES/kvm-block-dirty-bitmap-remove-assertion-from-restore.patch

7711c0
From 03544f6a149a35f62d97106fd5320f8b53cbc085 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Thu, 24 Jan 2019 00:55:11 +0100
7711c0
Subject: [PATCH 6/8] block/dirty-bitmap: remove assertion from restore
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190124005511.27662-3-jsnow@redhat.com>
7711c0
Patchwork-id: 84104
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 2/2] block/dirty-bitmap: remove assertion from restore
7711c0
Bugzilla: 1658426
7711c0
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
RH-Acked-by: Max Reitz <mreitz@redhat.com>
7711c0
RH-Acked-by: Eric Blake <eblake@redhat.com>
7711c0
7711c0
When making a backup of a dirty bitmap (for transactions), we want to
7711c0
restore that backup whether or not the bitmap is enabled.
7711c0
7711c0
It is perfectly valid to write into bitmaps that are disabled. It is
7711c0
only illegitimate for the guest to have done so.
7711c0
7711c0
Remove this assertion.
7711c0
7711c0
Reviewed-by: Eric Blake <eblake@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Message-Id: <20181221093529.23855-3-jsnow@redhat.com>
7711c0
Signed-off-by: Eric Blake <eblake@redhat.com>
7711c0
(cherry picked from commit 07d5a8df6a0018d831baef6d50f53f31a06b5a60)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/dirty-bitmap.c | 1 -
7711c0
 1 file changed, 1 deletion(-)
7711c0
7711c0
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
7711c0
index f580c1a..bc662d3 100644
7711c0
--- a/block/dirty-bitmap.c
7711c0
+++ b/block/dirty-bitmap.c
7711c0
@@ -610,7 +610,6 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out)
7711c0
 void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in)
7711c0
 {
7711c0
     HBitmap *tmp = bitmap->bitmap;
7711c0
-    assert(bdrv_dirty_bitmap_enabled(bitmap));
7711c0
     assert(!bdrv_dirty_bitmap_readonly(bitmap));
7711c0
     bitmap->bitmap = in;
7711c0
     hbitmap_free(tmp);
7711c0
-- 
7711c0
1.8.3.1
7711c0