|
|
ae23c9 |
From 765f5eca1f61622a160e3e8fdf8337f00f4b7558 Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Date: Tue, 20 Nov 2018 18:18:12 +0000
|
|
|
ae23c9 |
Subject: [PATCH 18/35] dirty-bitmap: rename bdrv_undo_clear_dirty_bitmap
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Message-id: <20181120181828.15132-9-jsnow@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 83061
|
|
|
ae23c9 |
O-Subject: [RHEL8/rhel qemu-kvm PATCH 08/24] dirty-bitmap: rename bdrv_undo_clear_dirty_bitmap
|
|
|
ae23c9 |
Bugzilla: 1518989
|
|
|
ae23c9 |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Use more generic names to reuse the function for bitmap merge in the
|
|
|
ae23c9 |
following commit.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
ae23c9 |
Reviewed-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 56bd662497259400b7c9f155aaebaddde4450028)
|
|
|
ae23c9 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
block/dirty-bitmap.c | 4 ++--
|
|
|
ae23c9 |
blockdev.c | 2 +-
|
|
|
ae23c9 |
include/block/block_int.h | 2 +-
|
|
|
ae23c9 |
3 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
|
|
|
ae23c9 |
index 6c8761e..017ee9d 100644
|
|
|
ae23c9 |
--- a/block/dirty-bitmap.c
|
|
|
ae23c9 |
+++ b/block/dirty-bitmap.c
|
|
|
ae23c9 |
@@ -633,12 +633,12 @@ void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out)
|
|
|
ae23c9 |
bdrv_dirty_bitmap_unlock(bitmap);
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
-void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in)
|
|
|
ae23c9 |
+void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup)
|
|
|
ae23c9 |
{
|
|
|
ae23c9 |
HBitmap *tmp = bitmap->bitmap;
|
|
|
ae23c9 |
assert(bdrv_dirty_bitmap_enabled(bitmap));
|
|
|
ae23c9 |
assert(!bdrv_dirty_bitmap_readonly(bitmap));
|
|
|
ae23c9 |
- bitmap->bitmap = in;
|
|
|
ae23c9 |
+ bitmap->bitmap = backup;
|
|
|
ae23c9 |
hbitmap_free(tmp);
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/blockdev.c b/blockdev.c
|
|
|
ae23c9 |
index b3d265b..2d86465 100644
|
|
|
ae23c9 |
--- a/blockdev.c
|
|
|
ae23c9 |
+++ b/blockdev.c
|
|
|
ae23c9 |
@@ -2142,7 +2142,7 @@ static void block_dirty_bitmap_clear_abort(BlkActionState *common)
|
|
|
ae23c9 |
common, common);
|
|
|
ae23c9 |
|
|
|
ae23c9 |
if (state->backup) {
|
|
|
ae23c9 |
- bdrv_undo_clear_dirty_bitmap(state->bitmap, state->backup);
|
|
|
ae23c9 |
+ bdrv_restore_dirty_bitmap(state->bitmap, state->backup);
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/include/block/block_int.h b/include/block/block_int.h
|
|
|
ae23c9 |
index ff923b7..f457acb 100644
|
|
|
ae23c9 |
--- a/include/block/block_int.h
|
|
|
ae23c9 |
+++ b/include/block/block_int.h
|
|
|
ae23c9 |
@@ -1141,7 +1141,7 @@ bool blk_dev_is_medium_locked(BlockBackend *blk);
|
|
|
ae23c9 |
void bdrv_set_dirty(BlockDriverState *bs, int64_t offset, int64_t bytes);
|
|
|
ae23c9 |
|
|
|
ae23c9 |
void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap **out);
|
|
|
ae23c9 |
-void bdrv_undo_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *in);
|
|
|
ae23c9 |
+void bdrv_restore_dirty_bitmap(BdrvDirtyBitmap *bitmap, HBitmap *backup);
|
|
|
ae23c9 |
|
|
|
ae23c9 |
void bdrv_inc_in_flight(BlockDriverState *bs);
|
|
|
ae23c9 |
void bdrv_dec_in_flight(BlockDriverState *bs);
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|