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(a)redhat.com>
---
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