mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35: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,
|
qemuMigrationDstComplete(virQEMUDriver *driver,
|
||||||
virDomainObj *vm,
|
virDomainObj *vm,
|
||||||
bool inPostCopy,
|
bool inPostCopy,
|
||||||
virDomainAsyncJob asyncJob)
|
virDomainAsyncJob asyncJob,
|
||||||
|
qemuDomainJobObj *job)
|
||||||
{
|
{
|
||||||
qemuDomainObjPrivate *priv = vm->privateData;
|
qemuDomainObjPrivate *priv = vm->privateData;
|
||||||
qemuDomainJobPrivate *jobPriv = priv->job.privateData;
|
qemuDomainJobPrivate *jobPriv = job->privateData;
|
||||||
virObjectEvent *event;
|
virObjectEvent *event;
|
||||||
|
|
||||||
if (inPostCopy) {
|
if (inPostCopy) {
|
||||||
@ -5817,10 +5818,10 @@ qemuMigrationDstComplete(virQEMUDriver *driver,
|
|||||||
* is obsolete anyway.
|
* is obsolete anyway.
|
||||||
*/
|
*/
|
||||||
if (inPostCopy)
|
if (inPostCopy)
|
||||||
g_clear_pointer(&priv->job.completed, virDomainJobDataFree);
|
g_clear_pointer(&job->completed, virDomainJobDataFree);
|
||||||
|
|
||||||
qemuMigrationParamsReset(driver, vm, asyncJob, jobPriv->migParams,
|
qemuMigrationParamsReset(driver, vm, asyncJob, jobPriv->migParams,
|
||||||
priv->job.apiFlags);
|
job->apiFlags);
|
||||||
|
|
||||||
virPortAllocatorRelease(priv->migrationPort);
|
virPortAllocatorRelease(priv->migrationPort);
|
||||||
priv->migrationPort = 0;
|
priv->migrationPort = 0;
|
||||||
@ -6052,7 +6053,7 @@ qemuMigrationDstFinishActive(virQEMUDriver *driver,
|
|||||||
VIR_WARN("Unable to encode migration cookie");
|
VIR_WARN("Unable to encode migration cookie");
|
||||||
|
|
||||||
qemuMigrationDstComplete(driver, vm, inPostCopy,
|
qemuMigrationDstComplete(driver, vm, inPostCopy,
|
||||||
VIR_ASYNC_JOB_MIGRATION_IN);
|
VIR_ASYNC_JOB_MIGRATION_IN, &priv->job);
|
||||||
|
|
||||||
return dom;
|
return dom;
|
||||||
|
|
||||||
|
@ -195,7 +195,8 @@ void
|
|||||||
qemuMigrationDstComplete(virQEMUDriver *driver,
|
qemuMigrationDstComplete(virQEMUDriver *driver,
|
||||||
virDomainObj *vm,
|
virDomainObj *vm,
|
||||||
bool inPostCopy,
|
bool inPostCopy,
|
||||||
virDomainAsyncJob asyncJob);
|
virDomainAsyncJob asyncJob,
|
||||||
|
qemuDomainJobObj *job);
|
||||||
|
|
||||||
int
|
int
|
||||||
qemuMigrationSrcConfirm(virQEMUDriver *driver,
|
qemuMigrationSrcConfirm(virQEMUDriver *driver,
|
||||||
|
Loading…
Reference in New Issue
Block a user