Blame SOURCES/libvirt-qemu-checkpoint-rename-disk-chkdisk-in-qemuCheckpointDiscardBitmaps.patch

a41c76
From 4a0a0c37c0f3ea2c8eb6b96b07c990d7a4ce1c8b Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <4a0a0c37c0f3ea2c8eb6b96b07c990d7a4ce1c8b@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Tue, 4 Feb 2020 15:07:51 +0100
a41c76
Subject: [PATCH] qemu: checkpoint: rename disk->chkdisk in
a41c76
 qemuCheckpointDiscardBitmaps
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
Upcoming patches will also use the domain disk definition. Rename disk
a41c76
to chkdisk for clarity.
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Eric Blake <eblake@redhat.com>
a41c76
(cherry picked from commit a303e8ea47c9a2caa39ae744c0bf9a2f724a6137)
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1207659
a41c76
Message-Id: <0799859ad288a747f1d12dd07bbb403053d78457.1580824112.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/qemu/qemu_checkpoint.c | 12 ++++++------
a41c76
 1 file changed, 6 insertions(+), 6 deletions(-)
a41c76
a41c76
diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
a41c76
index 9ff3129570..d347b8fc6c 100644
a41c76
--- a/src/qemu/qemu_checkpoint.c
a41c76
+++ b/src/qemu/qemu_checkpoint.c
a41c76
@@ -124,13 +124,13 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
a41c76
         return -1;
a41c76
 
a41c76
     for (i = 0; i < chkdef->ndisks; i++) {
a41c76
-        virDomainCheckpointDiskDef *disk = &chkdef->disks[i];
a41c76
+        virDomainCheckpointDiskDef *chkdisk = &chkdef->disks[i];
a41c76
         const char *node;
a41c76
 
a41c76
-        if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
a41c76
+        if (chkdisk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
a41c76
             continue;
a41c76
 
a41c76
-        node = qemuDomainDiskNodeFormatLookup(vm, disk->name);
a41c76
+        node = qemuDomainDiskNodeFormatLookup(vm, chkdisk->name);
a41c76
         /* If any ancestor checkpoint has a bitmap for the same
a41c76
          * disk, then this bitmap must be merged to the
a41c76
          * ancestor. */
a41c76
@@ -145,7 +145,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
a41c76
                 g_autoptr(virJSONValue) arr = NULL;
a41c76
 
a41c76
                 disk2 = &parentdef->disks[j];
a41c76
-                if (STRNEQ(disk->name, disk2->name) ||
a41c76
+                if (STRNEQ(chkdisk->name, disk2->name) ||
a41c76
                     disk2->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
a41c76
                     continue;
a41c76
                 search_parents = false;
a41c76
@@ -153,7 +153,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
a41c76
                 if (!(arr = virJSONValueNewArray()))
a41c76
                     return -1;
a41c76
 
a41c76
-                if (qemuMonitorTransactionBitmapMergeSourceAddBitmap(arr, node, disk->bitmap) < 0)
a41c76
+                if (qemuMonitorTransactionBitmapMergeSourceAddBitmap(arr, node, chkdisk->bitmap) < 0)
a41c76
                     return -1;
a41c76
 
a41c76
                 if (chkcurrent) {
a41c76
@@ -166,7 +166,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
a41c76
             }
a41c76
         }
a41c76
 
a41c76
-        if (qemuMonitorTransactionBitmapRemove(actions, node, disk->bitmap) < 0)
a41c76
+        if (qemuMonitorTransactionBitmapRemove(actions, node, chkdisk->bitmap) < 0)
a41c76
             return -1;
a41c76
     }
a41c76
 
a41c76
-- 
a41c76
2.25.0
a41c76