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>
This commit is contained in:
Michael S. Tsirkin 2010-11-23 19:05:54 +02:00
parent b2e0a138e7
commit 3d002df33e
4 changed files with 16 additions and 11 deletions

View file

@ -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);