提交 1034418b 编写于 作者: J Jiri Denemark

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: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 0d9752e5
...@@ -2391,7 +2391,9 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, ...@@ -2391,7 +2391,9 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
migParams) < 0) migParams) < 0)
goto stopjob; goto stopjob;
if (qemuMigrationParamsSetPostCopy(vm, flags & VIR_MIGRATE_POSTCOPY, if (qemuMigrationParamsSetCapability(vm,
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
flags & VIR_MIGRATE_POSTCOPY,
migParams) < 0) migParams) < 0)
goto stopjob; goto stopjob;
...@@ -2416,6 +2418,8 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, ...@@ -2416,6 +2418,8 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
migParams) < 0) migParams) < 0)
goto stopjob; goto stopjob;
priv->job.postcopyEnabled = flags & VIR_MIGRATE_POSTCOPY;
if (mig->nbd && if (mig->nbd &&
flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC) && flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC) &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) { virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) {
...@@ -3349,7 +3353,9 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver, ...@@ -3349,7 +3353,9 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
migParams) < 0) migParams) < 0)
goto error; goto error;
if (qemuMigrationParamsSetPostCopy(vm, flags & VIR_MIGRATE_POSTCOPY, if (qemuMigrationParamsSetCapability(vm,
QEMU_MONITOR_MIGRATION_CAPS_POSTCOPY,
flags & VIR_MIGRATE_POSTCOPY,
migParams) < 0) migParams) < 0)
goto error; goto error;
...@@ -3386,6 +3392,8 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver, ...@@ -3386,6 +3392,8 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
migParams) < 0) migParams) < 0)
goto error; goto error;
priv->job.postcopyEnabled = flags & VIR_MIGRATE_POSTCOPY;
if (migrate_flags & (QEMU_MONITOR_MIGRATE_NON_SHARED_DISK | if (migrate_flags & (QEMU_MONITOR_MIGRATE_NON_SHARED_DISK |
QEMU_MONITOR_MIGRATE_NON_SHARED_INC)) { QEMU_MONITOR_MIGRATE_NON_SHARED_INC)) {
if (mig->nbd) { if (mig->nbd) {
......
...@@ -199,23 +199,6 @@ qemuMigrationParamsSetCapability(virDomainObjPtr vm ATTRIBUTE_UNUSED, ...@@ -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 /* qemuMigrationParamsEnableTLS
* @driver: pointer to qemu driver * @driver: pointer to qemu driver
* @vm: domain object * @vm: domain object
......
...@@ -77,11 +77,6 @@ qemuMigrationParamsSetCapability(virDomainObjPtr vm, ...@@ -77,11 +77,6 @@ qemuMigrationParamsSetCapability(virDomainObjPtr vm,
bool state, bool state,
qemuMigrationParamsPtr migParams); qemuMigrationParamsPtr migParams);
int
qemuMigrationParamsSetPostCopy(virDomainObjPtr vm,
bool state,
qemuMigrationParamsPtr migParams);
int int
qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver, qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
virDomainObjPtr vm, virDomainObjPtr vm,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册