]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Do not report completed stats until the job finishes
authorJiri Denemark <jdenemar@redhat.com>
Tue, 23 Feb 2016 11:40:47 +0000 (12:40 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 8 Mar 2016 15:26:00 +0000 (16:26 +0100)
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@redhat.com>
src/qemu/qemu_driver.c

index 40203640005f53e379802c066bb39055bd5cf149..a90c1b8baa4799945a6acd50463aca474df2e727 100644 (file)
@@ -13016,7 +13016,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;