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