提交 21986f50 编写于 作者: P Peter Krempa

qemu: Fix indexes in statistics of iothreads

In commit 2ccb5335 I've refactored how we fill the typed parameters
for domain statistics. The commit introduced a regression in the
formating of stats for IOthreads by using the array index to label the
entries as it's common for all other types of statistics rather than
the iothread IDs used for iothreads.

Since only the design of iothread deviates from the common approach used
in all other statistic types this was not caught.

https://bugzilla.redhat.com/show_bug.cgi?id=1778014Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 06f5f60e
......@@ -21208,13 +21208,16 @@ qemuDomainGetStatsIOThread(virQEMUDriverPtr driver,
for (i = 0; i < niothreads; i++) {
if (iothreads[i]->poll_valid) {
if (virTypedParamListAddULLong(params, iothreads[i]->poll_max_ns,
"iothread.%zu.poll-max-ns", i) < 0)
"iothread.%u.poll-max-ns",
iothreads[i]->iothread_id) < 0)
goto cleanup;
if (virTypedParamListAddUInt(params, iothreads[i]->poll_grow,
"iothread.%zu.poll-grow", i) < 0)
"iothread.%u.poll-grow",
iothreads[i]->iothread_id) < 0)
goto cleanup;
if (virTypedParamListAddUInt(params, iothreads[i]->poll_shrink,
"iothread.%zu.poll-shrink", i) < 0)
"iothread.%u.poll-shrink",
iothreads[i]->iothread_id) < 0)
goto cleanup;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册