diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b9413fa45e..d9feba2548 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -332,7 +332,6 @@ qemuDomainObjResetAsyncJob(qemuDomainObjPrivatePtr priv) job->abortJob = false; job->spiceMigration = false; job->spiceMigrated = false; - job->postcopyEnabled = false; job->dumpCompleted = false; VIR_FREE(job->error); VIR_FREE(job->current); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index bb052a0f03..40d9a6f247 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -176,7 +176,6 @@ struct _qemuDomainJobObj { bool spiceMigration; /* we asked for spice migration and we * should wait for it to finish */ bool spiceMigrated; /* spice migration completed */ - bool postcopyEnabled; /* post-copy migration was enabled */ char *error; /* job event completion error */ bool dumpCompleted; /* dump completed */ diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4588768ed6..ef1b475cb5 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13818,7 +13818,7 @@ qemuDomainMigrateStartPostCopy(virDomainPtr dom, goto endjob; } - if (!priv->job.postcopyEnabled) { + if (!(priv->job.apiFlags & VIR_MIGRATE_POSTCOPY)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("switching to post-copy requires migration to be " "started with VIR_MIGRATE_POSTCOPY flag")); diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 431875c762..ad87aebd3b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2406,8 +2406,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, migParams) < 0) goto stopjob; - priv->job.postcopyEnabled = flags & VIR_MIGRATE_POSTCOPY; - if (mig->nbd && flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC) && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) { @@ -3346,8 +3344,6 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver, migParams) < 0) goto error; - priv->job.postcopyEnabled = flags & VIR_MIGRATE_POSTCOPY; - if (migrate_flags & (QEMU_MONITOR_MIGRATE_NON_SHARED_DISK | QEMU_MONITOR_MIGRATE_NON_SHARED_INC)) { if (mig->nbd) {