[libvirt] [PATCH 8/8] qemu: Properly reset all migration capabilities

Peter Krempa pkrempa at redhat.com
Fri Apr 7 10:25:54 UTC 2017


On Wed, Apr 05, 2017 at 15:10:03 +0200, Jiri Denemark wrote:
> So far only QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY was reset, but only in
> a single code path leaving post-copy enabled in quite a few cases.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1425003
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_migration.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index cc3e58c16..1feb320b8 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c
> @@ -5342,9 +5342,6 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
>           */
>          if (inPostCopy)
>              VIR_FREE(priv->job.completed);
> -
> -        qemuMigrationSetPostCopy(driver, vm, false,
> -                                 QEMU_ASYNC_JOB_MIGRATION_IN);
>      }
>  
>      qemuMigrationReset(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN);
> @@ -5873,9 +5870,16 @@ qemuMigrationReset(virQEMUDriverPtr driver,
>                     virDomainObjPtr vm,
>                     qemuDomainAsyncJob job)
>  {
> +    qemuMonitorMigrationCaps cap;
> +
>      if (!virDomainObjIsActive(vm))
>          return;
>  
>      if (qemuMigrationResetTLS(driver, vm, job) < 0)
>          return;
> +
> +    for (cap = 0; cap < QEMU_MONITOR_MIGRATION_CAPS_LAST; cap++) {
> +        if (qemuMigrationSetOption(driver, vm, cap, false, job) < 0)

Well, this allways queries whether the capability is supported ... 

> +            return;
> +    }
>  }

ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170407/067f370c/attachment-0001.sig>


More information about the libvir-list mailing list