yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
26ba25
From 5944f5aa58219777441158766624e571b53de954 Mon Sep 17 00:00:00 2001
26ba25
From: John Snow <jsnow@redhat.com>
26ba25
Date: Tue, 20 Nov 2018 18:18:05 +0000
26ba25
Subject: [PATCH 11/35] block: remove bdrv_dirty_bitmap_make_anon
26ba25
26ba25
RH-Author: John Snow <jsnow@redhat.com>
26ba25
Message-id: <20181120181828.15132-2-jsnow@redhat.com>
26ba25
Patchwork-id: 83052
26ba25
O-Subject: [RHEL8/rhel qemu-kvm PATCH 01/24] block: remove bdrv_dirty_bitmap_make_anon
26ba25
Bugzilla: 1518989
26ba25
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
26ba25
RH-Acked-by: Max Reitz <mreitz@redhat.com>
26ba25
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
26ba25
From: Paolo Bonzini <pbonzini@redhat.com>
26ba25
26ba25
All this function is doing will be repeated by
26ba25
bdrv_do_release_matching_dirty_bitmap_locked, except
26ba25
resetting bm->persistent.  But even that does not matter
26ba25
because the bitmap will be freed.
26ba25
26ba25
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
26ba25
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
26ba25
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
26ba25
Message-id: 20180323164254.26487-1-pbonzini@redhat.com
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
(cherry picked from commit ab41fc4853cc0cf01ed4903ffe7c36e3768b538f)
26ba25
Signed-off-by: John Snow <jsnow@redhat.com>
26ba25
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
26ba25
---
26ba25
 block/dirty-bitmap.c         | 9 ---------
26ba25
 blockdev.c                   | 1 -
26ba25
 include/block/dirty-bitmap.h | 1 -
26ba25
 3 files changed, 11 deletions(-)
26ba25
26ba25
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
26ba25
index f580c1a..634f143 100644
26ba25
--- a/block/dirty-bitmap.c
26ba25
+++ b/block/dirty-bitmap.c
26ba25
@@ -98,15 +98,6 @@ BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, const char *name)
26ba25
 }
26ba25
 
26ba25
 /* Called with BQL taken.  */
26ba25
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap)
26ba25
-{
26ba25
-    assert(!bdrv_dirty_bitmap_frozen(bitmap));
26ba25
-    g_free(bitmap->name);
26ba25
-    bitmap->name = NULL;
26ba25
-    bitmap->persistent = false;
26ba25
-}
26ba25
-
26ba25
-/* Called with BQL taken.  */
26ba25
 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
26ba25
                                           uint32_t granularity,
26ba25
                                           const char *name,
26ba25
diff --git a/blockdev.c b/blockdev.c
26ba25
index 70af034..69610e7 100644
26ba25
--- a/blockdev.c
26ba25
+++ b/blockdev.c
26ba25
@@ -2977,7 +2977,6 @@ void qmp_block_dirty_bitmap_remove(const char *node, const char *name,
26ba25
         }
26ba25
     }
26ba25
 
26ba25
-    bdrv_dirty_bitmap_make_anon(bitmap);
26ba25
     bdrv_release_dirty_bitmap(bs, bitmap);
26ba25
 }
26ba25
 
26ba25
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
26ba25
index af9ba3c..bf68dd7 100644
26ba25
--- a/include/block/dirty-bitmap.h
26ba25
+++ b/include/block/dirty-bitmap.h
26ba25
@@ -24,7 +24,6 @@ BdrvDirtyBitmap *bdrv_reclaim_dirty_bitmap(BlockDriverState *bs,
26ba25
 void bdrv_dirty_bitmap_enable_successor(BdrvDirtyBitmap *bitmap);
26ba25
 BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs,
26ba25
                                         const char *name);
26ba25
-void bdrv_dirty_bitmap_make_anon(BdrvDirtyBitmap *bitmap);
26ba25
 void bdrv_release_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap);
26ba25
 void bdrv_release_named_dirty_bitmaps(BlockDriverState *bs);
26ba25
 void bdrv_release_persistent_dirty_bitmaps(BlockDriverState *bs);
26ba25
-- 
26ba25
1.8.3.1
26ba25