[PATCH for 7.10] qemu: monitor: Fix usage of 'query-blockstats'

Ján Tomko jtomko at redhat.com
Thu Nov 25 13:06:05 UTC 2021


On a Thursday in 2021, Peter Krempa wrote:
>Commit bc24810c2cab modified code querying blockstats to use the
>'query-nodes' parameter so that we can fetch stats also for images which
>are not attached to a frontend such as block copy and backup scratch
>images.
>
>Unfortunately that broke the old blockstats because if 'query-nodes' is
>enabled qemu doesn't output the 'qdev' parameter which our code used for
>matching to the disk and also qemu neglects to populate the frontend
>stats at all so we can't even switch to using nodenema for matching.

s/nodenema/nodename/
or did you mean nodenemark?

>
>To fix this we need to do two calls, one with 'query-nodes' disabled
>using the old logic to populate everything and then an aditional one

*additional

>which populates all the remaining images.
>
>Closes: https://gitlab.com/libvirt/libvirt/-/issues/246
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_monitor_json.c | 52 +++++++++++++++++++++++++++++++++---
> tests/qemumonitorjsontest.c  |  2 ++
> 2 files changed, 50 insertions(+), 4 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20211125/9e1a42de/attachment-0001.sig>


More information about the libvir-list mailing list