mirror of https://gitee.com/openkylin/libvirt.git
qemu: Only set group_name when actually requested
We were setting it based on whether it was supported and that lead to setting it to NULL, which our JSON code caught. However it ended up producing the following results: $ virsh blkdeviotune fedora vda --total-bytes-sec-max 2000 error: Unable to change block I/O throttle error: internal error: argument key 'group' must not have null value Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
bfc32e5895
commit
e9d75343d4
|
@ -17506,7 +17506,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
|
|||
qemuDomainObjEnterMonitor(driver, vm);
|
||||
ret = qemuMonitorSetBlockIoThrottle(priv->mon, device,
|
||||
&info, supportMaxOptions,
|
||||
supportGroupNameOption,
|
||||
set_fields & QEMU_BLOCK_IOTUNE_SET_GROUP_NAME,
|
||||
supportMaxLengthOptions);
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0)
|
||||
ret = -1;
|
||||
|
|
|
@ -4607,7 +4607,7 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
|
|||
|
||||
if (supportGroupNameOption &&
|
||||
virJSONValueObjectAdd(args,
|
||||
"s:group", info->group_name,
|
||||
"S:group", info->group_name,
|
||||
NULL) < 0)
|
||||
goto cleanup;
|
||||
|
||||
|
|
Loading…
Reference in New Issue