Blame SOURCES/kvm-block-dirty-bitmap-remove-set-reset-assertions-again.patch

7711c0
From f969846f7376f6e33b3af86c498a51cb29ca0cca Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 3 Apr 2019 18:18:41 +0200
7711c0
Subject: [PATCH 136/163] block/dirty-bitmap: remove set/reset assertions
7711c0
 against enabled bit
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190403181857.9693-6-jsnow@redhat.com>
7711c0
Patchwork-id: 85426
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH 05/21] block/dirty-bitmap: remove set/reset assertions against enabled bit
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
bdrv_set_dirty_bitmap and bdrv_reset_dirty_bitmap are only used as an
7711c0
internal API by the mirror and migration areas of our code. These
7711c0
calls modify the bitmap, but do so at the behest of QEMU and not the
7711c0
guest.
7711c0
7711c0
Presently, these bitmaps are always "enabled" anyway, but there's no
7711c0
reason they have to be.
7711c0
7711c0
Modify these internal APIs to drop this assertion.
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: 20190223000614.13894-4-jsnow@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit c28ddbb07ef39d79a81941d97faa1a1bb1ce2249)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/dirty-bitmap.c | 2 --
7711c0
 1 file changed, 2 deletions(-)
7711c0
7711c0
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
7711c0
index f8984b8..7dc5b55 100644
7711c0
--- a/block/dirty-bitmap.c
7711c0
+++ b/block/dirty-bitmap.c
7711c0
@@ -544,7 +544,6 @@ int64_t bdrv_dirty_iter_next(BdrvDirtyBitmapIter *iter)
7711c0
 void bdrv_set_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap,
7711c0
                                   int64_t offset, int64_t bytes)
7711c0
 {
7711c0
-    assert(bdrv_dirty_bitmap_enabled(bitmap));
7711c0
     assert(!bdrv_dirty_bitmap_readonly(bitmap));
7711c0
     hbitmap_set(bitmap->bitmap, offset, bytes);
7711c0
 }
7711c0
@@ -561,7 +560,6 @@ void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
7711c0
 void bdrv_reset_dirty_bitmap_locked(BdrvDirtyBitmap *bitmap,
7711c0
                                     int64_t offset, int64_t bytes)
7711c0
 {
7711c0
-    assert(bdrv_dirty_bitmap_enabled(bitmap));
7711c0
     assert(!bdrv_dirty_bitmap_readonly(bitmap));
7711c0
     hbitmap_reset(bitmap->bitmap, offset, bytes);
7711c0
 }
7711c0
-- 
7711c0
1.8.3.1
7711c0