summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-11-23 19:05:54 +0200
committerMichael S. Tsirkin <mst@redhat.com>2010-12-02 21:13:39 +0200
commit3d002df33eb034757d98e1ae529318f57df78f91 (patch)
tree5c2a07b26b26f74b9b76ee460f567060ce1340f7 /migration.c
parentb2e0a138e77245290428a7d599a929e2e1bfe510 (diff)
migration: allow rate > 4g
I'd like to disable bandwidth limit or make it very high, Use int64_t all over to make values >= 4g work. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/migration.c b/migration.c
index 9ee8b179c0..622a9d2d95 100644
--- a/migration.c
+++ b/migration.c
@@ -32,7 +32,7 @@
#endif
/* Migration speed throttling */
-static uint32_t max_throttle = (32 << 20);
+static int64_t max_throttle = (32 << 20);
static MigrationState *current_migration;
@@ -136,7 +136,9 @@ int do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)
FdMigrationState *s;
d = qdict_get_int(qdict, "value");
- d = MAX(0, MIN(UINT32_MAX, d));
+ if (d < 0) {
+ d = 0;
+ }
max_throttle = d;
s = migrate_to_fms(current_migration);