提交 e9d75343 编写于 作者: M Martin Kletzander

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: NMartin Kletzander <mkletzan@redhat.com>
上级 bfc32e58
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册