[PATCH] qemu: migration: Use correct flag when preparing block dirty bitmaps

Jim Fehlig posted 1 patch 2 years, 9 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210716153003.2990-1-jfehlig@suse.com
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] qemu: migration: Use correct flag when preparing block dirty bitmaps
Posted by Jim Fehlig 2 years, 9 months ago
qemuMigrationSrcRunPrepareBlockDirtyBitmaps receives the flags parameter
from qemuMigrationSrcRun, where flags are based on the main API enum
values. Similar to commit f58349c9c6, use the main API enum instead of
internal driver enum when checking flags in
qemuMigrationSrcRunPrepareBlockDirtyBitmaps.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
---

Noticed by visiual inspection while investigating a bug report similar to
https://bugzilla.redhat.com/show_bug.cgi?id=1978526

 src/qemu/qemu_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 2ec7b7c48b..ba8c0bd2d0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3972,7 +3972,7 @@ qemuMigrationSrcRunPrepareBlockDirtyBitmaps(virDomainObj *vm,
      * directly, otherwise we must create merged bitmaps from the whole
      * chain */
 
-    if (!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_INC) &&
+    if (!(flags & VIR_MIGRATE_NON_SHARED_INC) &&
         qemuMigrationSrcRunPrepareBlockDirtyBitmapsMerge(vm, mig) < 0)
         return -1;
 
-- 
2.31.1


Re: [PATCH] qemu: migration: Use correct flag when preparing block dirty bitmaps
Posted by Peter Krempa 2 years, 9 months ago
On Fri, Jul 16, 2021 at 09:30:03 -0600, Jim Fehlig wrote:
> qemuMigrationSrcRunPrepareBlockDirtyBitmaps receives the flags parameter
> from qemuMigrationSrcRun, where flags are based on the main API enum
> values. Similar to commit f58349c9c6, use the main API enum instead of
> internal driver enum when checking flags in
> qemuMigrationSrcRunPrepareBlockDirtyBitmaps.
> 
> Signed-off-by: Jim Fehlig <jfehlig@suse.com>
> ---
> 
> Noticed by visiual inspection while investigating a bug report similar to
> https://bugzilla.redhat.com/show_bug.cgi?id=1978526
> 
>  src/qemu/qemu_migration.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 2ec7b7c48b..ba8c0bd2d0 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -3972,7 +3972,7 @@ qemuMigrationSrcRunPrepareBlockDirtyBitmaps(virDomainObj *vm,
>       * directly, otherwise we must create merged bitmaps from the whole
>       * chain */
>  
> -    if (!(flags & QEMU_MONITOR_MIGRATE_NON_SHARED_INC) &&
> +    if (!(flags & VIR_MIGRATE_NON_SHARED_INC) &&

Oops yet another cut&paste fail on my side.

The comment directly above this also mentions the wrong flag. Please fix
that one as well before pushing.

>          qemuMigrationSrcRunPrepareBlockDirtyBitmapsMerge(vm, mig) < 0)
>          return -1;

Reviewed-by: Peter Krempa <pkrempa@redhat.com>