diff options
author | Glauber Costa <glommer@redhat.com> | 2009-05-20 18:26:58 -0400 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-05-22 10:50:31 -0500 |
commit | daa91de28dd011a39b80d76da96c432273fb5bf2 (patch) | |
tree | a5cb96c6596cd5c4233dcea81f67062976f9bfa0 /migration.c | |
parent | 19629537bd8d81fa7a32f2df5c39419afded04fa (diff) |
allow changing the speed of a running migration
This patch allow us to call migrate_set_speed on running
migrations. This should allow mgmt tools to increase the allocated
bandwidth of a running migration if there is no progress, and they
really want the migration to succeed.
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/migration.c b/migration.c index cccc2d1590..401383cf0a 100644 --- a/migration.c +++ b/migration.c @@ -84,6 +84,7 @@ void do_migrate_set_speed(Monitor *mon, const char *value) { double d; char *ptr; + FdMigrationState *s; d = strtod(value, &ptr); switch (*ptr) { @@ -98,6 +99,12 @@ void do_migrate_set_speed(Monitor *mon, const char *value) } max_throttle = (uint32_t)d; + s = migrate_to_fms(current_migration); + + if (s) { + qemu_file_set_rate_limit(s->file, max_throttle); + } + } void do_info_migrate(Monitor *mon) |