Blame SOURCES/kvm-dirty-bitmap-rename-bdrv_undo_clear_dirty_bitmap.patch

7711c0
From 3cccc41aae7526469ca941d12857ed3d6195b782 Mon Sep 17 00:00:00 2001
7711c0
From: John Snow <jsnow@redhat.com>
7711c0
Date: Wed, 6 Feb 2019 22:12:27 +0100
7711c0
Subject: [PATCH 17/33] dirty-bitmap: rename bdrv_undo_clear_dirty_bitmap
7711c0
7711c0
RH-Author: John Snow <jsnow@redhat.com>
7711c0
Message-id: <20190206221243.7407-8-jsnow@redhat.com>
7711c0
Patchwork-id: 84271
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 07/23] dirty-bitmap: rename bdrv_undo_clear_dirty_bitmap
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: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
7711c0
Use more generic names to reuse the function for bitmap merge in the
7711c0
following commit.
7711c0
7711c0
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
7711c0
Reviewed-by: John Snow <jsnow@redhat.com>
7711c0
(cherry picked from commit 56bd662497259400b7c9f155aaebaddde4450028)
7711c0
Signed-off-by: John Snow <jsnow@redhat.com>
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 block/dirty-bitmap.c      | 4 ++--
7711c0
 blockdev.c                | 2 +-
7711c0
 include/block/block_int.h | 2 +-
7711c0
 3 files changed, 4 insertions(+), 4 deletions(-)
7711c0
7711c0
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
7711c0
index 999a40c..cadde5c 100644
7711c0
--- a/block/dirty-bitmap.c
7711c0
+++ b/block/dirty-bitmap.c
7711c0
@@ -633,11 +633,11 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out)
7711c0
     bdrv_dirty_bitmap_unlock(bitmap);
7711c0
 }
7711c0
 
7711c0
-void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in)
7711c0
+void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup)
7711c0
 {
7711c0
     HBitmap *tmp = bitmap->bitmap;
7711c0
     assert(!bdrv_dirty_bitmap_readonly(bitmap));
7711c0
-    bitmap->bitmap = in;
7711c0
+    bitmap->bitmap = backup;
7711c0
     hbitmap_free(tmp);
7711c0
 }
7711c0
 
7711c0
diff --git a/blockdev.c b/blockdev.c
7711c0
index cef1bfe..5d9508c 100644
7711c0
--- a/blockdev.c
7711c0
+++ b/blockdev.c
7711c0
@@ -2184,7 +2184,7 @@ static void block_dirty_bitmap_clear_abort(BlkActionState *common)
7711c0
                                              common, common);
7711c0
 
7711c0
     if (state->backup) {
7711c0
-        bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
7711c0
+        bdrv_restore_dirty_bitmap(state->bitmap, state->backup);
7711c0
     }
7711c0
 }
7711c0
 
7711c0
diff --git a/include/block/block_int.h b/include/block/block_int.h
7711c0
index ff923b7..f457acb 100644
7711c0
--- a/include/block/block_int.h
7711c0
+++ b/include/block/block_int.h
7711c0
@@ -1141,7 +1141,7 @@ bool blk_dev_is_medium_locked(BlockBackend *blk);
7711c0
 void bdrv_set_dirty(BlockDriverState *bs, int64_t offset, int64_t bytes);
7711c0
 
7711c0
 void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out);
7711c0
-void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in);
7711c0
+void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup);
7711c0
 
7711c0
 void bdrv_inc_in_flight(BlockDriverState *bs);
7711c0
 void bdrv_dec_in_flight(BlockDriverState *bs);
7711c0
-- 
7711c0
1.8.3.1
7711c0