The original code was incorrect and never tested because at the time of implementing it the cgroup file `io.weight` was not available. Resolves: https://issues.redhat.com/browse/RHEL-45185 Introduced-by: 9c1693eff427661616ce1bd2795688f87288a412 Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/util/vircgroupv1.c | 2 +- src/util/vircgroupv2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/vircgroupv1.c b/src/util/vircgroupv1.c index 77c7e209ce..c1f0562249 100644 --- a/src/util/vircgroupv1.c +++ b/src/util/vircgroupv1.c @@ -1225,7 +1225,7 @@ virCgroupV1SetBlkioDeviceWeight(virCgroup *group, if (group->unitName) { GVariant *value = NULL; - value = g_variant_new_parsed("[(%s, uint64 %u)]", path, weight); + value = g_variant_new_parsed("[(%s, %t)]", path, weight); return virCgroupSetValueDBus(group->unitName, "BlockIODeviceWeight", value); } else { diff --git a/src/util/vircgroupv2.c b/src/util/vircgroupv2.c index db115e25f7..eaf5ae98f6 100644 --- a/src/util/vircgroupv2.c +++ b/src/util/vircgroupv2.c @@ -867,7 +867,7 @@ virCgroupV2SetBlkioDeviceWeight(virCgroup *group, if (group->unitName) { GVariant *value = NULL; - value = g_variant_new_parsed("[(%s, uint64 %u)]", path, weight); + value = g_variant_new_parsed("[(%s, %t)]", path, weight); return virCgroupSetValueDBus(group->unitName, "IODeviceWeight", value); } else { -- 2.45.2