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

[libvirt] [PATCH v3 REBASE 15/16] qemu: migrate: copy disks stats to completed job



---
 src/qemu/qemu_migration.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 906f8fe..54cfdd0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3867,6 +3867,13 @@ qemuMigrationRun(virQEMUDriverPtr driver,
                                            QEMU_ASYNC_JOB_MIGRATION_OUT,
                                            dconn) < 0)
             ret = -1;
+
+        if (ret == 0 && priv->job.completed) {
+            priv->job.completed->stats.disk_transferred =
+                                    priv->job.current->stats.disk_transferred;
+            priv->job.completed->stats.disk_total =
+                                    priv->job.current->stats.disk_total;
+        }
     }
 
     VIR_FREE(tlsAlias);
-- 
1.8.3.1


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