This rename is required to reuse this function in per-domain bandwidth setup routine Signed-off-by: Alexander Burluka <aburluka@xxxxxxxxxxxxx> --- src/qemu/qemu_cgroup.c | 14 +++++++------- src/qemu/qemu_cgroup.h | 6 +++--- src/qemu/qemu_driver.c | 5 ++--- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index e41f461..452d71d 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -944,9 +944,9 @@ qemuSetupCgroup(virQEMUDriverPtr driver, } int -qemuSetupCgroupVcpuBW(virCgroupPtr cgroup, - unsigned long long period, - long long quota) +qemuSetupBandwidthCgroup(virCgroupPtr cgroup, + unsigned long long period, + long long quota) { unsigned long long old_period; @@ -1053,7 +1053,7 @@ qemuSetupCgroupForVcpu(virDomainObjPtr vm) goto cleanup; if (period || quota) { - if (qemuSetupCgroupVcpuBW(cgroup_vcpu, period, quota) < 0) + if (qemuSetupBandwidthCgroup(cgroup_vcpu, period, quota) < 0) goto cleanup; } @@ -1152,8 +1152,8 @@ qemuSetupCgroupForEmulator(virDomainObjPtr vm) if (period || quota) { if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPU) && - qemuSetupCgroupVcpuBW(cgroup_emulator, period, - quota) < 0) + qemuSetupBandwidthCgroup(cgroup_emulator, period, + quota) < 0) goto cleanup; } @@ -1217,7 +1217,7 @@ qemuSetupCgroupForIOThreads(virDomainObjPtr vm) goto cleanup; if (period || quota) { - if (qemuSetupCgroupVcpuBW(cgroup_iothread, period, quota) < 0) + if (qemuSetupBandwidthCgroup(cgroup_iothread, period, quota) < 0) goto cleanup; } diff --git a/src/qemu/qemu_cgroup.h b/src/qemu/qemu_cgroup.h index 2bcf071..17da920 100644 --- a/src/qemu/qemu_cgroup.h +++ b/src/qemu/qemu_cgroup.h @@ -49,9 +49,9 @@ int qemuSetupCgroup(virQEMUDriverPtr driver, size_t nnicindexes, int *nicindexes); int qemuSetupCpusetMems(virDomainObjPtr vm); -int qemuSetupCgroupVcpuBW(virCgroupPtr cgroup, - unsigned long long period, - long long quota); +int qemuSetupBandwidthCgroup(virCgroupPtr cgroup, + unsigned long long period, + long long quota); int qemuSetupCgroupCpusetCpus(virCgroupPtr cgroup, virBitmapPtr cpumask); int qemuSetupCgroupForVcpu(virDomainObjPtr vm); int qemuSetupCgroupForIOThreads(virDomainObjPtr vm); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8ccf68b..48aeab6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10251,8 +10251,7 @@ qemuSetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr cgroup, if (virCgroupNewThread(cgroup, VIR_CGROUP_THREAD_VCPU, i, false, &cgroup_vcpu) < 0) goto cleanup; - - if (qemuSetupCgroupVcpuBW(cgroup_vcpu, period, quota) < 0) + if (qemuSetupBandwidthCgroup(cgroup_vcpu, period, quota) < 0) goto cleanup; virCgroupFree(&cgroup_vcpu); @@ -10279,7 +10278,7 @@ qemuSetEmulatorBandwidthLive(virCgroupPtr cgroup, false, &cgroup_emulator) < 0) goto cleanup; - if (qemuSetupCgroupVcpuBW(cgroup_emulator, period, quota) < 0) + if (qemuSetupBandwidthCgroup(cgroup_emulator, period, quota) < 0) goto cleanup; virCgroupFree(&cgroup_emulator); -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list