From 09fa15417e6c4778f50c8396004efd74077afa81 Mon Sep 17 00:00:00 2001
From: John Snow <jsnow@redhat.com>
Date: Wed, 6 Feb 2019 22:12:29 +0100
Subject: [PATCH 19/33] blockdev: rename block-dirty-bitmap-clear transaction
handlers
RH-Author: John Snow <jsnow@redhat.com>
Message-id: <20190206221243.7407-10-jsnow@redhat.com>
Patchwork-id: 84274
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v2 09/23] blockdev: rename block-dirty-bitmap-clear transaction handlers
Bugzilla: 1658343
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Rename block-dirty-bitmap-clear transaction handlers to reuse them for
x-block-dirty-bitmap-merge transaction in the following patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
(cherry picked from commit 5c4cf8b294ee65c049d6c40f5f6ff7c1befdb3d9)
Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
blockdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 823a97f..853dd0e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2178,7 +2178,7 @@ static void block_dirty_bitmap_clear_prepare(BlkActionState *common,
bdrv_clear_dirty_bitmap(state->bitmap, &state->backup);
}
-static void block_dirty_bitmap_clear_abort(BlkActionState *common)
+static void block_dirty_bitmap_restore(BlkActionState *common)
{
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
common, common);
@@ -2188,7 +2188,7 @@ static void block_dirty_bitmap_clear_abort(BlkActionState *common)
}
}
-static void block_dirty_bitmap_clear_commit(BlkActionState *common)
+static void block_dirty_bitmap_free_backup(BlkActionState *common)
{
BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
common, common);
@@ -2322,8 +2322,8 @@ static const BlkActionOps actions[] = {
[TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_CLEAR] = {
.instance_size = sizeof(BlockDirtyBitmapState),
.prepare = block_dirty_bitmap_clear_prepare,
- .commit = block_dirty_bitmap_clear_commit,
- .abort = block_dirty_bitmap_clear_abort,
+ .commit = block_dirty_bitmap_free_backup,
+ .abort = block_dirty_bitmap_restore,
},
[TRANSACTION_ACTION_KIND_X_BLOCK_DIRTY_BITMAP_ENABLE] = {
.instance_size = sizeof(BlockDirtyBitmapState),
--
1.8.3.1