mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 09:53:10 +00:00
qemu: Drop qemuMigrationParamsSetPostCopy
It's just a tiny wrapper around qemuMigrationParamsSetCapability and setting priv->job.postcopyEnabled is not something qemuMigrationParams code should be doing anyway so let the callers do it. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0d9752e589
commit
1034418b54
@ -2391,8 +2391,10 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
|
||||
migParams) < 0)
|
||||
goto stopjob;
|
||||
|
||||
if (qemuMigrationParamsSetPostCopy(vm, flags & VIR_MIGRATE_POSTCOPY,
|
||||
migParams) < 0)
|
||||
if (qemuMigrationParamsSetCapability(vm,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
|
||||
flags & VIR_MIGRATE_POSTCOPY,
|
||||
migParams) < 0)
|
||||
goto stopjob;
|
||||
|
||||
if (qemuMigrationParamsCheck(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN,
|
||||
@ -2416,6 +2418,8 @@ 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)) {
|
||||
@ -3349,8 +3353,10 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
|
||||
migParams) < 0)
|
||||
goto error;
|
||||
|
||||
if (qemuMigrationParamsSetPostCopy(vm, flags & VIR_MIGRATE_POSTCOPY,
|
||||
migParams) < 0)
|
||||
if (qemuMigrationParamsSetCapability(vm,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
|
||||
flags & VIR_MIGRATE_POSTCOPY,
|
||||
migParams) < 0)
|
||||
goto error;
|
||||
|
||||
if (qemuMigrationCapsGet(vm, QEMU_MONITOR_MIGRATION_CAPS_PAUSE_BEFORE_SWITCHOVER) &&
|
||||
@ -3386,6 +3392,8 @@ 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) {
|
||||
|
@ -199,23 +199,6 @@ qemuMigrationParamsSetCapability(virDomainObjPtr vm ATTRIBUTE_UNUSED,
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
qemuMigrationParamsSetPostCopy(virDomainObjPtr vm,
|
||||
bool state,
|
||||
qemuMigrationParamsPtr migParams)
|
||||
{
|
||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||
|
||||
if (qemuMigrationParamsSetCapability(vm,
|
||||
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
|
||||
state, migParams) < 0)
|
||||
return -1;
|
||||
|
||||
priv->job.postcopyEnabled = state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* qemuMigrationParamsEnableTLS
|
||||
* @driver: pointer to qemu driver
|
||||
* @vm: domain object
|
||||
|
@ -77,11 +77,6 @@ qemuMigrationParamsSetCapability(virDomainObjPtr vm,
|
||||
bool state,
|
||||
qemuMigrationParamsPtr migParams);
|
||||
|
||||
int
|
||||
qemuMigrationParamsSetPostCopy(virDomainObjPtr vm,
|
||||
bool state,
|
||||
qemuMigrationParamsPtr migParams);
|
||||
|
||||
int
|
||||
qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
|
Loading…
Reference in New Issue
Block a user