Commit <318d807a0bd3372b634d1952b559c5c627ccfa5b> added a fix to skip
most of the block stat code to not log error message for missing storage
sources but forgot to increase the recordnr counter.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_driver.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 69fcd28666..c34af6b7d1 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18414,8 +18414,14 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDefPtr disk,
VIR_INFO("optional disk '%s' source file is missing, "
"skip getting stats", disk->dst);
- return qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recordnr,
- params);
+ if (qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recordnr,
+ params) < 0) {
+ return -1;
+ }
+
+ (*recordnr)++;
+
+ return 0;
}
/* vhost-user disk doesn't support getting block stats */
--
2.29.2