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(a)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