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

[libvirt] [PATCH] migration: convert speed from Mb/sec to bytes/sec in drive-mirror jobs



Block migration speed is differect from memory migration speed, because
it not convert speed from Mb/sec to bytes/sec in the drive-mirror job.

Signed-off-by: Rudy Zhang <rudyflyzhang gmail com>
---
 src/qemu/qemu_migration.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 8bc76bf..7648d8c 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2135,8 +2135,8 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver,
 
         qemuBlockJobSyncBegin(disk);
         /* Force "raw" format for NBD export */
-        mon_ret = qemuMonitorDriveMirror(priv->mon, diskAlias, nbd_dest,
-                                         "raw", speed, 0, 0, mirror_flags);
+        mon_ret = qemuMonitorDriveMirror(priv->mon, diskAlias, nbd_dest,"raw",
+                        (unsigned long long)speed << 20, 0, 0, mirror_flags);
         VIR_FREE(diskAlias);
         VIR_FREE(nbd_dest);
 
-- 
2.6.4


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