mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: add 'speed' optional parameter to block-stream
Allow streaming operations to be started with an initial speed limit. This eliminates the window of time between starting streaming and issuing block-job-set-speed. Users should use the new optional 'speed' parameter instead so that speed limits are in effect immediately when the job starts. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
parent
882ec7ce53
commit
c83c66c3b5
8 changed files with 42 additions and 15 deletions
4
hmp.c
4
hmp.c
|
@ -835,8 +835,10 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict)
|
|||
Error *error = NULL;
|
||||
const char *device = qdict_get_str(qdict, "device");
|
||||
const char *base = qdict_get_try_str(qdict, "base");
|
||||
int64_t speed = qdict_get_try_int(qdict, "speed", 0);
|
||||
|
||||
qmp_block_stream(device, base != NULL, base, &error);
|
||||
qmp_block_stream(device, base != NULL, base,
|
||||
qdict_haskey(qdict, "speed"), speed, &error);
|
||||
|
||||
hmp_handle_error(mon, &error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue