https://bugzilla.redhat.com/show_bug.cgi?id=1253107
Call virCgroupGetBlkioWeight to re-read blkio.weight right
after it are set in order to keep our internal structures
up-to-date.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b6ac075..5cc38ad 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9183,7 +9183,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
virTypedParameterPtr param = ¶ms[i];
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
- if (virCgroupSetBlkioWeight(priv->cgroup, param->value.ui) < 0)
+ if (virCgroupSetBlkioWeight(priv->cgroup, param->value.ui) < 0
||
+ virCgroupGetBlkioWeight(priv->cgroup, &def->blkio.weight)
< 0)
ret = -1;
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS) ||
--
1.8.3.1