[PATCH 25/31] qemu: driver: Convert disk stats code to use 'format' nodename accessors

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

 



I case of statistics we're interested in the statistics of the effective
bitmap whatever it happens to be.

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6d95711cbc..2d1d0bb3e2 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -9368,7 +9368,7 @@ qemuDomainBlocksStatsGather(virDomainObj *vm,

         /* capacity are reported only per node-name so we need to transfer them */
         if (disk && disk->src &&
-            (capstats = virHashLookup(blockstats, disk->src->nodeformat))) {
+            (capstats = virHashLookup(blockstats, qemuBlockStorageSourceGetEffectiveNodename(disk->src)))) {
             (*retstats)->capacity = capstats->capacity;
             (*retstats)->physical = capstats->physical;
             (*retstats)->wr_highest_offset = capstats->wr_highest_offset;
@@ -17348,7 +17348,7 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef *disk,

         if (QEMU_DOMAIN_DISK_PRIVATE(disk)->qomName) {
             frontendalias = QEMU_DOMAIN_DISK_PRIVATE(disk)->qomName;
-            backendalias = n->nodeformat;
+            backendalias = qemuBlockStorageSourceGetEffectiveNodename(n);
             backendstoragealias = qemuBlockStorageSourceGetStorageNodename(n);
         } else {
             /* alias may be NULL if the VM is not running */
@@ -17402,7 +17402,7 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef *disk,
                 return -1;

             if (qemuDomainGetStatsOneBlock(driver, cfg, dom, params,
-                                           disk->mirror->nodeformat,
+                                           qemuBlockStorageSourceGetEffectiveNodename(disk->mirror),
                                            disk->mirror,
                                            *recordnr,
                                            stats) < 0)
@@ -17431,7 +17431,7 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef *disk,
                         return -1;

                     if (qemuDomainGetStatsOneBlock(driver, cfg, dom, params,
-                                                   backupdisk->store->nodeformat,
+                                                   qemuBlockStorageSourceGetEffectiveNodename(backupdisk->store),
                                                    backupdisk->store,
                                                    *recordnr,
                                                    stats) < 0)
-- 
2.41.0




[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