[libvirt] [PATCH RFC 13/40] qemu: monitor: Introduce new interface to query-named-block-nodes
Eric Blake
eblake at redhat.com
Fri Oct 18 20:56:24 UTC 2019
On 10/18/19 11:10 AM, Peter Krempa wrote:
> Retrieve data for individual block nodes in a hash table. Currently only
> capacity and allocation data is extracted but this will be extended in
> the future.
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> src/qemu/qemu_monitor.c | 18 ++++++++++
> src/qemu/qemu_monitor.h | 11 ++++++
> src/qemu/qemu_monitor_json.c | 69 ++++++++++++++++++++++++++++++++++++
> src/qemu/qemu_monitor_json.h | 3 ++
> 4 files changed, 101 insertions(+)
>
> +++ b/src/qemu/qemu_monitor_json.c
> @@ -2879,6 +2879,75 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitorPtr mon,
> }
>
>
> +static void
> +qemuMonitorJSONBlockNamedNodeDataFree(qemuBlockNamedNodeDataPtr data)
> +{
> + if (!data)
> + return;
> +
> + g_free(data);
> +}
g_free(NULL) is a no-op; the short-circuit at the beginning is pointless
now (although it might be needed later).
Otherwise, ACK.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the libvir-list
mailing list