mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
qemu: domain: Rename qemuDomainDetectVcpuPids to qemuDomainRefreshVcpuInfo
The function will eventually do more useful stuff than just detection of thread ids.
This commit is contained in:
parent
dd976f786c
commit
8f56b5baaf
@ -5624,18 +5624,18 @@ 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,
|
||||
qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int asyncJob)
|
||||
{
|
||||
|
@ -647,7 +647,8 @@ int qemuDomainDefValidateMemoryHotplug(const virDomainDef *def,
|
||||
|
||||
bool qemuDomainHasVcpuPids(virDomainObjPtr vm);
|
||||
pid_t qemuDomainGetVcpuPid(virDomainObjPtr vm, unsigned int vcpuid);
|
||||
int qemuDomainDetectVcpuPids(virQEMUDriverPtr driver, virDomainObjPtr vm,
|
||||
int qemuDomainRefreshVcpuInfo(virQEMUDriverPtr driver,
|
||||
virDomainObjPtr vm,
|
||||
int asyncJob);
|
||||
|
||||
bool qemuDomainSupportsNicdev(virDomainDefPtr def,
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user