Blame SOURCES/kvm-block-remove-bdrv_dirty_bitmap_make_anon.patch

7711c0
From f803d3a0cda98654a4cf53ec64dcd179b4ccc6d4 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 6 Feb 2019 22:12:21 +0100
7711c0
Subject: [PATCH 11/33] block: remove bdrv_dirty_bitmap_make_anon
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190206221243.7407-2-jsnow@redhat.com>
7711c0
Patchwork-id: 84261
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 01/23] block: remove bdrv_dirty_bitmap_make_anon
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
From: Paolo Bonzini <pbonzini@redhat.com>
7711c0
7711c0
All this function is doing will be repeated by
7711c0
bdrv_do_release_matching_dirty_bitmap_locked, except
7711c0
resetting bm->persistent.  But even that does not matter
7711c0
because the bitmap will be freed.
7711c0
7711c0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
7711c0
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
7711c0
Message-id: 20180323164254.26487-1-pbonzini@redhat.com
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit ab41fc4853cc0cf01ed4903ffe7c36e3768b538f)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/dirty-bitmap.c         | 9 ---------
7711c0
 blockdev.c                   | 1 -
7711c0
 include/block/dirty-bitmap.h | 1 -
7711c0
 3 files changed, 11 deletions(-)
7711c0
7711c0
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
7711c0
index bc662d3..50e855a 100644
7711c0
--- a/block/dirty-bitmap.c
7711c0
+++ b/block/dirty-bitmap.c
7711c0
@@ -98,15 +98,6 @@ BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, const char *name)
7711c0
 }
7711c0
 
7711c0
 /* Called with BQL taken.  */
7711c0
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap)
7711c0
-{
7711c0
-    assert(!bdrv_dirty_bitmap_frozen(bitmap));
7711c0
-    g_free(bitmap->name);
7711c0
-    bitmap->name = NULL;
7711c0
-    bitmap->persistent = false;
7711c0
-}
7711c0
-
7711c0
-/* Called with BQL taken.  */
7711c0
 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
7711c0
                                           uint32_t granularity,
7711c0
                                           const char *name,
7711c0
diff --git a/blockdev.c b/blockdev.c
7711c0
index f25ab15..745ed08 100644
7711c0
--- a/blockdev.c
7711c0
+++ b/blockdev.c
7711c0
@@ -3019,7 +3019,6 @@ void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
7711c0
         }
7711c0
     }
7711c0
 
7711c0
-    bdrv_dirty_bitmap_make_anon(bitmap);
7711c0
     bdrv_release_dirty_bitmap(bs, bitmap);
7711c0
 }
7711c0
 
7711c0
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
7711c0
index af9ba3c..bf68dd7 100644
7711c0
--- a/include/block/dirty-bitmap.h
7711c0
+++ b/include/block/dirty-bitmap.h
7711c0
@@ -24,7 +24,6 @@ BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
7711c0
 void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
7711c0
 BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
7711c0
                                         const char *name);
7711c0
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap);
7711c0
 void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap);
7711c0
 void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs);
7711c0
 void bdrv_release_persistent_dirty_bitmaps(BlockDriverState *bs);
7711c0
-- 
7711c0
1.8.3.1
7711c0