mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu: Pass qemuDomainJobObj to qemuMigrationDstComplete
When reconnecting to an active domain we need to use a different job structure than the one referenced from the VM object. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
dbfcbe0896
commit
cc9f385a1d
@ -5773,10 +5773,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) {
|
||||
@ -5817,10 +5818,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;
|
||||
@ -6052,7 +6053,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;
|
||||
|
||||
|
@ -195,7 +195,8 @@ void
|
||||
qemuMigrationDstComplete(virQEMUDriver *driver,
|
||||
virDomainObj *vm,
|
||||
bool inPostCopy,
|
||||
virDomainAsyncJob asyncJob);
|
||||
virDomainAsyncJob asyncJob,
|
||||
qemuDomainJobObj *job);
|
||||
|
||||
int
|
||||
qemuMigrationSrcConfirm(virQEMUDriver *driver,
|
||||
|
Loading…
Reference in New Issue
Block a user