On 08/12/2015 09:53 PM, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1253107
Update the weight in vm def to fix this.
Signed-off-by: Luyao Huang <lhuang(a)redhat.com>
---
src/qemu/qemu_driver.c | 2 ++
1 file changed, 2 insertions(+)
Considering the series I recently ACK from Martin - shouldn't this to
make a virCgroupGetBlkioWeight type call to ensure you get/save whatever
the kernel saved?
John
See:
http://www.redhat.com/archives/libvir-list/2015-August/msg00065.html
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 7a984a8..0b984dc 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9170,6 +9170,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
if (STREQ(param->field, VIR_DOMAIN_BLKIO_WEIGHT)) {
if (virCgroupSetBlkioWeight(priv->cgroup, param->value.ui) <
0)
ret = -1;
+ else
+ def->blkio.weight = param->value.ui;
} else if (STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT) ||
STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_READ_IOPS) ||
STREQ(param->field, VIR_DOMAIN_BLKIO_DEVICE_WRITE_IOPS) ||