mirror of
https://github.com/mii443/qemu.git
synced 2025-12-12 05:18:37 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user