[libvirt] [PATCH 07/12] qemu: monitor: Count block stats fields in qemuMonitorGetAllBlockStatsInfo

Ján Tomko jtomko at redhat.com
Wed Mar 11 08:37:33 UTC 2015


On Tue, Mar 10, 2015 at 05:26:36PM +0100, Peter Krempa wrote:
> Our virDomainBlockStatsFlags API uses the old approach where, when it's
> called without the typed parameter array, returs the count of parameters

s/returs/returns/

> 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      | 26 +++++++++++++++++++-------
>  src/qemu/qemu_monitor_json.c | 15 +++++++++++----
>  src/qemu/qemu_monitor_text.c | 10 +++++++++-
>  3 files changed, 39 insertions(+), 12 deletions(-)
> 
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index 149e743..e4ff06e 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -1848,14 +1848,24 @@ int qemuMonitorGetBlockStatsInfo(qemuMonitorPtr mon,
>  }
> 
> 
> -/* Creates a hash table in 'ret_stats' with all block stats.
> - * Returns <0 on error, 0 on success.
> +/**
> + * qemuMonitorGetAllBlockStatsInfo:
> + * @mon: monitor object
> + * @ret_stats: pointer that is filled with a hash table containing the stats
> + * @backingChain: recurse into the bakcing chain of devices

s/bakcing/backing/

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150311/832f57e8/attachment-0001.sig>


More information about the libvir-list mailing list