yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-blockdev-rename-block-dirty-bitmap-clear-transaction.patch

ae23c9
From d0276297465c2de2c0a47e6f10f2749f17a26343 Mon Sep 17 00:00:00 2001
ae23c9
From: John Snow <jsnow@redhat.com>
ae23c9
Date: Tue, 20 Nov 2018 18:18:14 +0000
ae23c9
Subject: [PATCH 20/35] blockdev: rename block-dirty-bitmap-clear transaction
ae23c9
 handlers
ae23c9
ae23c9
RH-Author: John Snow <jsnow@redhat.com>
ae23c9
Message-id: <20181120181828.15132-11-jsnow@redhat.com>
ae23c9
Patchwork-id: 83065
ae23c9
O-Subject: [RHEL8/rhel qemu-kvm PATCH 10/24] blockdev: rename block-dirty-bitmap-clear transaction handlers
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
Rename block-dirty-bitmap-clear transaction handlers to reuse them for
ae23c9
x-block-dirty-bitmap-merge transaction in the following patch.
ae23c9
ae23c9
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
ae23c9
Reviewed-by: John Snow <jsnow@redhat.com>
ae23c9
(cherry picked from commit 5c4cf8b294ee65c049d6c40f5f6ff7c1befdb3d9)
ae23c9
Signed-off-by: John Snow <jsnow@redhat.com>
ae23c9
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ae23c9
---
ae23c9
 blockdev.c | 8 ++++----
ae23c9
 1 file changed, 4 insertions(+), 4 deletions(-)
ae23c9
ae23c9
diff --git a/blockdev.c b/blockdev.c
ae23c9
index a10fbbd..c4b9ddd 100644
ae23c9
--- a/blockdev.c
ae23c9
+++ b/blockdev.c
ae23c9
@@ -2136,7 +2136,7 @@ static void block_dirty_bitmap_clear_prepare(BlkActionState *common,
ae23c9
     bdrv_clear_dirty_bitmap(state->bitmap, &state->backup);
ae23c9
 }
ae23c9
 
ae23c9
-static void block_dirty_bitmap_clear_abort(BlkActionState *common)
ae23c9
+static void block_dirty_bitmap_restore(BlkActionState *common)
ae23c9
 {
ae23c9
     BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
ae23c9
                                              common, common);
ae23c9
@@ -2146,7 +2146,7 @@ static void block_dirty_bitmap_clear_abort(BlkActionState *common)
ae23c9
     }
ae23c9
 }
ae23c9
 
ae23c9
-static void block_dirty_bitmap_clear_commit(BlkActionState *common)
ae23c9
+static void block_dirty_bitmap_free_backup(BlkActionState *common)
ae23c9
 {
ae23c9
     BlockDirtyBitmapState *state = DO_UPCAST(BlockDirtyBitmapState,
ae23c9
                                              common, common);
ae23c9
@@ -2280,8 +2280,8 @@ static const BlkActionOps actions[] = {
ae23c9
     [TRANSACTION_ACTION_KIND_BLOCK_DIRTY_BITMAP_CLEAR] = {
ae23c9
         .instance_size = sizeof(BlockDirtyBitmapState),
ae23c9
         .prepare = block_dirty_bitmap_clear_prepare,
ae23c9
-        .commit = block_dirty_bitmap_clear_commit,
ae23c9
-        .abort = block_dirty_bitmap_clear_abort,
ae23c9
+        .commit = block_dirty_bitmap_free_backup,
ae23c9
+        .abort = block_dirty_bitmap_restore,
ae23c9
     },
ae23c9
     [TRANSACTION_ACTION_KIND_X_BLOCK_DIRTY_BITMAP_ENABLE] = {
ae23c9
         .instance_size = sizeof(BlockDirtyBitmapState),
ae23c9
-- 
ae23c9
1.8.3.1
ae23c9