[PATCH 22/68] qemu: Rename qemuMigrationParamsSet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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 d07a12cdec..3e775ea56b 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2479,8 +2479,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 &&
@@ -3474,8 +3474,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 7b5a7c108f..733df86687 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 45834e5b48..e06aaa74eb 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux