The new name is qemuMigrationParamsApply and it will soon become the
only API which will send all requested migration parameters and
capabilities to QEMU. All other qemuMigrationParams* APIs will just
operate on the qemuMigrationParams structure.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_migration.c | 8 ++++----
src/qemu/qemu_migration_params.c | 21 ++++++++++++++++-----
src/qemu/qemu_migration_params.h | 8 ++++----
3 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 54d9dfa025..602ccdfdd5 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2476,8 +2476,8 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver,
QEMU_ASYNC_JOB_MIGRATION_IN) < 0)
goto stopjob;
- if (qemuMigrationParamsSet(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN,
- migParams) < 0)
+ if (qemuMigrationParamsApply(driver, vm, QEMU_ASYNC_JOB_MIGRATION_IN,
+ migParams) < 0)
goto stopjob;
if (mig->nbd &&
@@ -3471,8 +3471,8 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver,
true, QEMU_ASYNC_JOB_MIGRATION_OUT) < 0)
goto error;
- if (qemuMigrationParamsSet(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
- migParams) < 0)
+ if (qemuMigrationParamsApply(driver, vm, QEMU_ASYNC_JOB_MIGRATION_OUT,
+ migParams) < 0)
goto error;
if (qemuDomainObjEnterMonitorAsync(driver, vm,
diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_params.c
index dd8cf68842..92fe84d324 100644
--- a/src/qemu/qemu_migration_params.c
+++ b/src/qemu/qemu_migration_params.c
@@ -108,11 +108,22 @@ qemuMigrationParamsFromFlags(virTypedParameterPtr params,
}
+/**
+ * qemuMigrationParamsApply
+ * @driver: qemu driver
+ * @vm: domain object
+ * @asyncJob: migration job
+ * @migParams: migration parameters to send to QEMU
+ *
+ * Send all parameters stored in @migParams to QEMU.
+ *
+ * Returns 0 on success, -1 on failure.
+ */
int
-qemuMigrationParamsSet(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- int asyncJob,
- qemuMigrationParamsPtr migParams)
+qemuMigrationParamsApply(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ int asyncJob,
+ qemuMigrationParamsPtr migParams)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
int ret = -1;
@@ -391,7 +402,7 @@ qemuMigrationParamsReset(virQEMUDriverPtr driver,
goto cleanup;
if (origParams) {
- if (qemuMigrationParamsSet(driver, vm, asyncJob, origParams) < 0)
+ if (qemuMigrationParamsApply(driver, vm, asyncJob, origParams) < 0)
goto cleanup;
qemuMigrationParamsResetTLS(driver, vm, asyncJob, origParams);
}
diff --git a/src/qemu/qemu_migration_params.h b/src/qemu/qemu_migration_params.h
index e8323dc9bb..ce7f84fd66 100644
--- a/src/qemu/qemu_migration_params.h
+++ b/src/qemu/qemu_migration_params.h
@@ -66,10 +66,10 @@ void
qemuMigrationParamsFree(qemuMigrationParamsPtr migParams);
int
-qemuMigrationParamsSet(virQEMUDriverPtr driver,
- virDomainObjPtr vm,
- int asyncJob,
- qemuMigrationParamsPtr migParams);
+qemuMigrationParamsApply(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
+ int asyncJob,
+ qemuMigrationParamsPtr migParams);
int
qemuMigrationParamsEnableTLS(virQEMUDriverPtr driver,
--
2.17.0