mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06: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:
parent
b2e0a138e7
commit
3d002df33e
4 changed files with 16 additions and 11 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue