[libvirt PATCH 39/80] qemu: Pass qemuDomainJobObj to qemuMigrationDstComplete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When reconnecting to an active domains we need to use a different job
structure than the one referenced from the VM object.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 11 ++++++-----
 src/qemu/qemu_migration.h |  3 ++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index ad9be3e68e..6938e0fafc 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5804,10 +5804,11 @@ void
 qemuMigrationDstComplete(virQEMUDriver *driver,
                          virDomainObj *vm,
                          bool inPostCopy,
-                         virDomainAsyncJob asyncJob)
+                         virDomainAsyncJob asyncJob,
+                         qemuDomainJobObj *job)
 {
     qemuDomainObjPrivate *priv = vm->privateData;
-    qemuDomainJobPrivate *jobPriv = priv->job.privateData;
+    qemuDomainJobPrivate *jobPriv = job->privateData;
     virObjectEvent *event;
 
     if (inPostCopy) {
@@ -5848,10 +5849,10 @@ qemuMigrationDstComplete(virQEMUDriver *driver,
      * is obsolete anyway.
      */
     if (inPostCopy)
-        g_clear_pointer(&priv->job.completed, virDomainJobDataFree);
+        g_clear_pointer(&job->completed, virDomainJobDataFree);
 
     qemuMigrationParamsReset(driver, vm, asyncJob, jobPriv->migParams,
-                             priv->job.apiFlags);
+                             job->apiFlags);
 
     virPortAllocatorRelease(priv->migrationPort);
     priv->migrationPort = 0;
@@ -6083,7 +6084,7 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver,
         VIR_WARN("Unable to encode migration cookie");
 
     qemuMigrationDstComplete(driver, vm, inPostCopy,
-                             VIR_ASYNC_JOB_MIGRATION_IN);
+                             VIR_ASYNC_JOB_MIGRATION_IN, &priv->job);
 
     return dom;
 
diff --git a/src/qemu/qemu_migration.h b/src/qemu/qemu_migration.h
index 1d6051859b..c099cf99cf 100644
--- a/src/qemu/qemu_migration.h
+++ b/src/qemu/qemu_migration.h
@@ -195,7 +195,8 @@ void
 qemuMigrationDstComplete(virQEMUDriver *driver,
                          virDomainObj *vm,
                          bool inPostCopy,
-                         virDomainAsyncJob asyncJob);
+                         virDomainAsyncJob asyncJob,
+                         qemuDomainJobObj *job);
 
 int
 qemuMigrationSrcConfirm(virQEMUDriver *driver,
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux