提交 f7e1a546 编写于 作者: H Hu Tao 提交者: Eric Blake

fix bug in qemuSetupCgroupForEmulator

Should not return 0 when failed to setup cgroup.
上级 f36fadca
......@@ -691,13 +691,17 @@ int qemuSetupCgroupForEmulator(struct qemud_driver *driver,
}
if (def->cputune.emulatorpin &&
qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET) &&
qemuSetupCgroupEmulatorPin(cgroup_emulator, def->cputune.emulatorpin) < 0)
goto cleanup;
qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPUSET)) {
rc = qemuSetupCgroupEmulatorPin(cgroup_emulator,
def->cputune.emulatorpin);
if (rc < 0)
goto cleanup;
}
if (period || quota) {
if (qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU)) {
if (qemuSetupCgroupVcpuBW(cgroup_emulator, period, quota) < 0)
if ((rc = qemuSetupCgroupVcpuBW(cgroup_emulator, period,
quota)) < 0)
goto cleanup;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册