From: Jiri Denemark Date: Tue, 23 Feb 2016 11:40:47 +0000 (+0100) Subject: qemu: Do not report completed stats until the job finishes X-Git-Tag: v1.3.3-rc1~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2374edf08446c173a20d96d1b1a436883878c81;p=thirdparty%2Flibvirt.git qemu: Do not report completed stats until the job finishes 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4020364000..a90c1b8baa 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;