[libvirt] [PATCH 5/7] qemu: Do not report completed stats until the job finishes
Jiri Denemark
jdenemar at redhat.com
Tue Feb 23 15:41:44 UTC 2016
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 at redhat.com>
---
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 45ff3c0..52b349d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12912,7 +12912,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
More information about the libvir-list
mailing list