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

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

 



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@xxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]