[PATCH 1/8] qemuDomainBlocksStatsGather: Always fetch stats for the full backing chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In certain cases such as when running a backup blockjob qemu installs a
filter node between the frontend and the top node of the backend of the
disk. The stats gathering code didn't instruct the monitor code to fetch
the stats for all the layers, so since the top layer now doesn't have
stats we were reporting wrong stats such as allocation.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2015281
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b9cc8f8379..34da87e330 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10051,13 +10051,13 @@ qemuDomainBlocksStatsGather(virQEMUDriver *driver,
     }

     qemuDomainObjEnterMonitor(driver, vm);
-    nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats, false);
+    nstats = qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats, true);

     if (capacity && nstats >= 0) {
         if (blockdev)
             rc = qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, blockstats);
         else
-            rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, blockstats, false);
+            rc = qemuMonitorBlockStatsUpdateCapacity(priv->mon, blockstats, true);
     }

     if (qemuDomainObjExitMonitor(driver, vm) < 0 || nstats < 0 || rc < 0)
-- 
2.31.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux