提交 075f66e3 编写于 作者: L Luyao Huang 提交者: Cole Robinson

qemu: Update blkio.weight value after successful set

https://bugzilla.redhat.com/show_bug.cgi?id=1253107

Make a call virCgroupGetBlkioWeight to re-read blkio.weight right
after it is set in order to keep internal data up-to-date.
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
(cherry picked from commit bf278821)
上级 77fa0088
......@@ -9185,7 +9185,8 @@ qemuDomainSetBlkioParameters(virDomainPtr dom,
virTypedParameterPtr param = &params[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) ||
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册