mirror of https://github.com/proxmox/mirror_qemu
rdma: remove check on time_spent when calculating mbs
Within the if statement, time_spent is assured to be non-zero. This patch just removes the check on time_spent when calculating mbs. Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>master
parent
58c652c08a
commit
5b648de0ee
|
@ -1691,8 +1691,8 @@ static void *migration_thread(void *opaque)
|
||||||
double bandwidth = (double)transferred_bytes / time_spent;
|
double bandwidth = (double)transferred_bytes / time_spent;
|
||||||
max_size = bandwidth * migrate_max_downtime() / 1000000;
|
max_size = bandwidth * migrate_max_downtime() / 1000000;
|
||||||
|
|
||||||
s->mbps = time_spent ? (((double) transferred_bytes * 8.0) /
|
s->mbps = (((double) transferred_bytes * 8.0) /
|
||||||
((double) time_spent / 1000.0)) / 1000.0 / 1000.0 : -1;
|
((double) time_spent / 1000.0)) / 1000.0 / 1000.0;
|
||||||
|
|
||||||
trace_migrate_transferred(transferred_bytes, time_spent,
|
trace_migrate_transferred(transferred_bytes, time_spent,
|
||||||
bandwidth, max_size);
|
bandwidth, max_size);
|
||||||
|
|
Loading…
Reference in New Issue