[libvirt] [RFC PATCH 03/16] qemu: checkpoint: rename disk->chkdisk in qemuCheckpointDiscardBitmaps

Peter Krempa posted 16 patches 6 years, 1 month ago
[libvirt] [RFC PATCH 03/16] qemu: checkpoint: rename disk->chkdisk in qemuCheckpointDiscardBitmaps
Posted by Peter Krempa 6 years, 1 month ago
Upcomming patches will also use the domain diks definition. Rename disk
to chkdisk for clarity.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_checkpoint.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_checkpoint.c b/src/qemu/qemu_checkpoint.c
index 9ff3129570..d347b8fc6c 100644
--- a/src/qemu/qemu_checkpoint.c
+++ b/src/qemu/qemu_checkpoint.c
@@ -124,13 +124,13 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
         return -1;

     for (i = 0; i < chkdef->ndisks; i++) {
-        virDomainCheckpointDiskDef *disk = &chkdef->disks[i];
+        virDomainCheckpointDiskDef *chkdisk = &chkdef->disks[i];
         const char *node;

-        if (disk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
+        if (chkdisk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
             continue;

-        node = qemuDomainDiskNodeFormatLookup(vm, disk->name);
+        node = qemuDomainDiskNodeFormatLookup(vm, chkdisk->name);
         /* If any ancestor checkpoint has a bitmap for the same
          * disk, then this bitmap must be merged to the
          * ancestor. */
@@ -145,7 +145,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
                 g_autoptr(virJSONValue) arr = NULL;

                 disk2 = &parentdef->disks[j];
-                if (STRNEQ(disk->name, disk2->name) ||
+                if (STRNEQ(chkdisk->name, disk2->name) ||
                     disk2->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
                     continue;
                 search_parents = false;
@@ -153,7 +153,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
                 if (!(arr = virJSONValueNewArray()))
                     return -1;

-                if (qemuMonitorTransactionBitmapMergeSourceAddBitmap(arr, node, disk->bitmap) < 0)
+                if (qemuMonitorTransactionBitmapMergeSourceAddBitmap(arr, node, chkdisk->bitmap) < 0)
                     return -1;

                 if (chkcurrent) {
@@ -166,7 +166,7 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
             }
         }

-        if (qemuMonitorTransactionBitmapRemove(actions, node, disk->bitmap) < 0)
+        if (qemuMonitorTransactionBitmapRemove(actions, node, chkdisk->bitmap) < 0)
             return -1;
     }

-- 
2.24.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [RFC PATCH 03/16] qemu: checkpoint: rename disk->chkdisk in qemuCheckpointDiscardBitmaps
Posted by Eric Blake 6 years ago
On 1/9/20 12:21 PM, Peter Krempa wrote:
> Upcomming patches will also use the domain diks definition. Rename disk

Upcoming, disck

> to chkdisk for clarity.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
>   src/qemu/qemu_checkpoint.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)

Mechanical, other than the commit message typos.
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Re: [RFC PATCH 03/16] qemu: checkpoint: rename disk->chkdisk in qemuCheckpointDiscardBitmaps
Posted by Eric Blake 6 years ago
On 1/24/20 11:15 AM, Eric Blake wrote:
> On 1/9/20 12:21 PM, Peter Krempa wrote:
>> Upcomming patches will also use the domain diks definition. Rename disk
> 
> Upcoming, disck

Urgh - I typo'd my typo correction.  'disck' is not a word, and 'disc' 
is unusual these days; so I meant 'disk'.

> 
>> to chkdisk for clarity.
>>
>> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>> ---
>>   src/qemu/qemu_checkpoint.c | 12 ++++++------
>>   1 file changed, 6 insertions(+), 6 deletions(-)
> 
> Mechanical, other than the commit message typos.
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org