mirror of https://gitee.com/openkylin/libvirt.git
qemu: Fix indexes in statistics of iothreads
In commit 2ccb5335dc
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=1778014
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
06f5f60e9a
commit
21986f5047
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue