mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 05:25:18 +00:00
fix bug in qemuSetupCgroupForEmulator
Should not return 0 when failed to setup cgroup.
This commit is contained in:
parent
f36fadca10
commit
f7e1a546f2
@ -691,13 +691,17 @@ int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (def->cputune.emulatorpin &&
|
if (def->cputune.emulatorpin &&
|
||||||
qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET) &&
|
qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET)) {
|
||||||
qemuSetupCgroupEmulatorPin(cgroup_emulator, def->cputune.emulatorpin) < 0)
|
rc = qemuSetupCgroupEmulatorPin(cgroup_emulator,
|
||||||
goto cleanup;
|
def->cputune.emulatorpin);
|
||||||
|
if (rc < 0)
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
if (period || quota) {
|
if (period || quota) {
|
||||||
if (qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU)) {
|
if (qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU)) {
|
||||||
if (qemuSetupCgroupVcpuBW(cgroup_emulator, period, quota) < 0)
|
if ((rc = qemuSetupCgroupVcpuBW(cgroup_emulator, period,
|
||||||
|
quota)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user