]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuMonitorJSONQueryBlockstats: query stats for helper images
authorPeter Krempa <pkrempa@redhat.com>
Mon, 1 Nov 2021 10:35:41 +0000 (11:35 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 4 Nov 2021 09:55:28 +0000 (10:55 +0100)
commitbc24810c2cabc21d1996fa814737e2f996f2c2bb
treeea9f12e819685df10975801323a104a853a739b4
parent6448470eca50e529658861c6eb3ae8109366db86
qemuMonitorJSONQueryBlockstats: query stats for helper images

Use the 'query-nodes' flag to return all stats. The flag was introduced
prior to qemu-2.11 so we can always use it, but we invoke it only when
querying stats. The other invocation is used for detecting the nodenames
which is fragile code.

The images without a frontend don't have the device field so the
extraction code checks need to be relaxed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.h