autoNodeset, &mem_mask, -1) < 0)
return -1;
- if (period || quota) {
- if (virDomainCgroupSetupVcpuBW(cgroup, period, quota) < 0)
- return -1;
- }
+ if (virDomainCgroupSetupVcpuBW(cgroup, period, quota) < 0)
+ return -1;
return 0;
}
qemuSetGlobalBWLive(virCgroup *cgroup, unsigned long long period,
long long quota)
{
- if (period == 0 && quota == 0)
- return 0;
-
if (virDomainCgroupSetupVcpuBW(cgroup, period, quota) < 0)
return -1;
{
size_t i;
- if (period == 0 && quota == 0)
- return 0;
-
if (!qemuDomainHasVcpuPids(vm))
return 0;
{
g_autoptr(virCgroup) cgroup_emulator = NULL;
- if (period == 0 && quota == 0)
- return 0;
-
if (virCgroupNewThread(cgroup, VIR_CGROUP_THREAD_EMULATOR, 0,
false, &cgroup_emulator) < 0)
return -1;
{
size_t i;
- if (period == 0 && quota == 0)
- return 0;
-
if (!vm->def->niothreadids)
return 0;
}
- if ((period || quota) &&
- virDomainCgroupSetupVcpuBW(cgroup, period, quota) < 0)
+ if (virDomainCgroupSetupVcpuBW(cgroup, period, quota) < 0)
goto cleanup;
/* Move the thread to the sub dir */