[PATCH] virsh: migrate: Fix logic bug in interlock of --copy-storage-synchronous-writes flag

Peter Krempa posted 1 patch 4 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/a78d9c618d0c87713fadc6d7a3db2b96e1de568e.1701848287.git.pkrempa@redhat.com
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] virsh: migrate: Fix logic bug in interlock of --copy-storage-synchronous-writes flag
Posted by Peter Krempa 4 months, 3 weeks ago
As the error message states we want to check that one of
'--copy-storage-all' or '--copy-storage-inc' is used, but the condition
mentioned VIR_MIGRATE_NON_SHARED_DISK twice.

Fixes: 1c2bd205edd
Resolves: https://issues.redhat.com/browse/RHEL-17596
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 66f933dead..f7784b46e9 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11194,7 +11194,7 @@ doMigrate(void *opaque)
     }

     if (flags & VIR_MIGRATE_NON_SHARED_SYNCHRONOUS_WRITES &&
-        !(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_DISK))) {
+        !(flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC))) {
         vshError(ctl, "'--copy-storage-synchronous-writes' requires one of '--copy-storage-all', '--copy-storage-inc'");
         goto out;
     }
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [PATCH] virsh: migrate: Fix logic bug in interlock of --copy-storage-synchronous-writes flag
Posted by Ján Tomko 4 months, 3 weeks ago
On a Wednesday in 2023, Peter Krempa wrote:
>As the error message states we want to check that one of
>'--copy-storage-all' or '--copy-storage-inc' is used, but the condition
>mentioned VIR_MIGRATE_NON_SHARED_DISK twice.
>
>Fixes: 1c2bd205edd
>Resolves: https://issues.redhat.com/browse/RHEL-17596
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tools/virsh-domain.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org