yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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