]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: monitor: Count block stats fields in qemuMonitorGetAllBlockStatsInfo
authorPeter Krempa <pkrempa@redhat.com>
Tue, 10 Mar 2015 13:40:58 +0000 (14:40 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 11 Mar 2015 10:28:04 +0000 (11:28 +0100)
commitbdc05128d79bc32b16c98c046111d0bcf7001d36
tree6bac8b2c54e42b5b22e73564c7204885fc6b4177
parent4d8ebb7a3511388185a97469b612f49c72a03002
qemu: monitor: Count block stats fields in qemuMonitorGetAllBlockStatsInfo

Our virDomainBlockStatsFlags API uses the old approach where, when it's
called without the typed parameter array, returns the count of parameters
supported by qemu.

The supported parameter count is obtained via separate monitor calls
which is a waste since we can calculate it when gathering the data.

This patch adds code to the qemuMonitorGetAllBlockStatsInfo workers that
allows to track the count of supported fields reported by qemu and will
allow to remove the old duplicate code.
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_text.c