]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: domain: Rename qemuDomainDetectVcpuPids to qemuDomainRefreshVcpuInfo
authorPeter Krempa <pkrempa@redhat.com>
Tue, 19 Jul 2016 14:00:29 +0000 (16:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Aug 2016 06:03:58 +0000 (08:03 +0200)
The function will eventually do more useful stuff than just detection of
thread ids.

src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_process.c

index efc1fb538d130c124435baaaecc91cd99b3240fa..5cde84103cf2667d348c489949877dd78165d068 100644 (file)
@@ -5624,20 +5624,20 @@ qemuDomainGetVcpuPid(virDomainObjPtr vm,
 
 
 /**
- * qemuDomainDetectVcpuPids:
+ * qemuDomainRefreshVcpuInfo:
  * @driver: qemu driver data
  * @vm: domain object
  * @asyncJob: current asynchronous job type
  *
- * Updates vCPU thread ids in the private data of @vm.
+ * Updates vCPU information private data of @vm.
  *
  * Returns number of detected vCPU threads on success, -1 on error and reports
  * an appropriate error, -2 if the domain doesn't exist any more.
  */
 int
-qemuDomainDetectVcpuPids(virQEMUDriverPtr driver,
-                         virDomainObjPtr vm,
-                         int asyncJob)
+qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
+                          virDomainObjPtr vm,
+                          int asyncJob)
 {
     virDomainVcpuDefPtr vcpu;
     size_t maxvcpus = virDomainDefGetVcpusMax(vm->def);
index 9e10ae4c785356340ef45d8e28d81d56be9561ea..31934273b55d6728188b7dfd8e94e86a162a67fd 100644 (file)
@@ -647,8 +647,9 @@ int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
 
 bool qemuDomainHasVcpuPids(virDomainObjPtr vm);
 pid_t qemuDomainGetVcpuPid(virDomainObjPtr vm, unsigned int vcpuid);
-int qemuDomainDetectVcpuPids(virQEMUDriverPtr driver, virDomainObjPtr vm,
-                             int asyncJob);
+int qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
+                              virDomainObjPtr vm,
+                              int asyncJob);
 
 bool qemuDomainSupportsNicdev(virDomainDefPtr def,
                               virDomainNetDefPtr net);
index 4a5191f8d6e52d4754acdcd548369bb72f8f07fb..24ae3aa1513541c57ae1bd65c18b5d64975a19e5 100644 (file)
@@ -4639,7 +4639,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriverPtr driver,
 
     vcpuinfo->online = true;
 
-    if ((rc = qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE)) <= 0) {
+    if ((rc = qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE)) <= 0) {
         /* vcpu pids were not detected, skip setting of affinity */
         if (rc == 0)
             ret = 0;
@@ -4689,7 +4689,7 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if ((rc = qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE)) < 0) {
+    if ((rc = qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE)) < 0) {
         /* rollback only if domain didn't exit */
         if (rc == -2)
             goto cleanup;
index f9efff9c5d03b3a109c6489c839ab7d94cf7ab26..6b662926e375b104c4a1ca94ae0588afde8b22e7 100644 (file)
@@ -5189,8 +5189,8 @@ qemuProcessLaunch(virConnectPtr conn,
     if (qemuSetupCpusetMems(vm) < 0)
         goto cleanup;
 
-    VIR_DEBUG("Detecting VCPU PIDs");
-    if (qemuDomainDetectVcpuPids(driver, vm, asyncJob) < 0)
+    VIR_DEBUG("Refreshing VCPU info");
+    if (qemuDomainRefreshVcpuInfo(driver, vm, asyncJob) < 0)
         goto cleanup;
 
     VIR_DEBUG("Detecting IOThread PIDs");
@@ -5982,7 +5982,7 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
     }
 
     VIR_DEBUG("Detecting VCPU PIDs");
-    if (qemuDomainDetectVcpuPids(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
+    if (qemuDomainRefreshVcpuInfo(driver, vm, QEMU_ASYNC_JOB_NONE) < 0)
         goto error;
 
     VIR_DEBUG("Detecting IOThread PIDs");