mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
ed7b4814b6
commit
bf2788218a
@ -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) ||
|
||||
|
Loading…
Reference in New Issue
Block a user