On 12/06/14 09:14, Eric Blake wrote:
Wire up backing chain recursion. Note that for now, we just use
...
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
src/qemu/qemu_driver.c | 55 +++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 46 insertions(+), 9 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index feaa4a2..b57beeb 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
...
@@ -18550,8 +18566,16 @@ qemuDomainGetStatsOneBlock(virQEMUDriverPtr
driver,
if (virStorageSourceIsLocalStorage(src) && src->path)
QEMU_ADD_NAME_PARAM(record, maxparams, "block", "path",
block_idx, src->path);
+ if (backing_idx)
+ QEMU_ADD_BLOCK_PARAM_UI(record, maxparams, block_idx, "backingIndex",
+ backing_idx);
- if (abbreviated || !disk->info.alias ||
+ /* FIXME: qemu gives information on backing files, but we aren't
+ * currently storing it into the stats table - we need a common
+ * key in qemu_monitor_json.c:qemuMonitorGetAllBlockStatsInfo and
+ * here for getting at that information, probably something like
+ * asprintf("%s.%d", alias, backing_idx). */
Breaks syntax-check:
src/qemu/qemu_driver.c:18577: * asprintf("%s.%d", alias,
backing_idx). */
maint.mk: use virAsprintf, not asprintf
+ if (abbreviated || backing_idx || !disk->info.alias ||
!(entry = virHashLookup(stats, disk->info.alias))) {
if (qemuStorageLimitsRefresh(driver, cfg, dom,
disk, src, NULL, NULL) < 0)
Rest of review will follow in-order.
Peter