提交 daa91de2 编写于 作者: G Glauber Costa 提交者: Anthony Liguori

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: NGlauber Costa <glommer@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 19629537
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册