[libvirt PATCH 3/6] qemu: Rename remoteCaps parameter in qemuMigrationParamsCheck

Jiri Denemark posted 6 patches 9 months, 1 week ago
[libvirt PATCH 3/6] qemu: Rename remoteCaps parameter in qemuMigrationParamsCheck
Posted by Jiri Denemark 9 months, 1 week ago
The migration cookie contains two bitmaps of migration capabilities:
supported and automatic. qemuMigrationParamsCheck expects the letter so
lets make it more obvious by renaming the parameter as remoteAuto.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration_params.c | 6 +++---
 src/qemu/qemu_migration_params.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index b02a8af8d5..f441c59d67 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -1290,7 +1290,7 @@ int
 qemuMigrationParamsCheck(virDomainObj *vm,
                          int asyncJob,
                          qemuMigrationParams *migParams,
-                         virBitmap *remoteCaps)
+                         virBitmap *remoteAuto)
 {
     qemuDomainJobPrivate *jobPriv = vm->job->privateData;
     qemuMigrationCapability cap;
@@ -1323,8 +1323,8 @@ qemuMigrationParamsCheck(virDomainObj *vm,
             if (qemuMigrationParamsAlwaysOn[i].party != party) {
                 bool remote = false;
 
-                if (remoteCaps)
-                    ignore_value(virBitmapGetBit(remoteCaps, cap, &remote));
+                if (remoteAuto)
+                    ignore_value(virBitmapGetBit(remoteAuto, cap, &remote));
 
                 if (!remote) {
                     VIR_DEBUG("Not enabling migration capability '%s'; it is "
diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h
index 5857673227..44f5c2a882 100644
--- a/src/qemu/qemu_migration_params.h
+++ b/src/qemu/qemu_migration_params.h
@@ -142,7 +142,7 @@ int
 qemuMigrationParamsCheck(virDomainObj *vm,
                          int asyncJob,
                          qemuMigrationParams *migParams,
-                         virBitmap *remoteCaps);
+                         virBitmap *remoteAuto);
 
 void
 qemuMigrationParamsReset(virDomainObj *vm,
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 3/6] qemu: Rename remoteCaps parameter in qemuMigrationParamsCheck
Posted by Peter Krempa 9 months, 1 week ago
On Mon, Jan 08, 2024 at 18:06:39 +0100, Jiri Denemark wrote:
> The migration cookie contains two bitmaps of migration capabilities:
> supported and automatic. qemuMigrationParamsCheck expects the letter so
> lets make it more obvious by renaming the parameter as remoteAuto.
> 
> Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
> ---
>  src/qemu/qemu_migration_params.c | 6 +++---
>  src/qemu/qemu_migration_params.h | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
> index b02a8af8d5..f441c59d67 100644
> --- a/src/qemu/qemu_migration_params.c
> +++ b/src/qemu/qemu_migration_params.c
> @@ -1290,7 +1290,7 @@ int
>  qemuMigrationParamsCheck(virDomainObj *vm,
>                           int asyncJob,
>                           qemuMigrationParams *migParams,
> -                         virBitmap *remoteCaps)
> +                         virBitmap *remoteAuto)

If only there was a possibility to add some text ... COMMENTing ... what
the parameters do, right ... /s

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org