[PATCH v2 5/7] qemu: Do not report completed stats until the job finishes

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

 



We would happily report and free statistics of a completed migration
even before it actually completed (on the source host while migration is
in the Finish phase).

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---

Notes:
    Version 2:
    - no change

 src/qemu/qemu_driver.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8a529af..8015fe3 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12910,7 +12910,9 @@ qemuDomainGetJobStatsInternal(virQEMUDriverPtr driver,
         goto cleanup;
     }
 
-    if (completed)
+    if (completed && priv->job.current)
+        info = NULL;
+    else if (completed)
         info = priv->job.completed;
     else
         info = priv->job.current;
-- 
2.7.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]