mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
qmp: add block_job_set_speed command
Add block_job_set_speed, which sets the maximum speed for a background block operation. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
12bd451fe0
commit
2d47c6e9aa
6 changed files with 79 additions and 0 deletions
11
hmp.c
11
hmp.c
|
@ -794,3 +794,14 @@ void hmp_block_stream(Monitor *mon, const QDict *qdict)
|
|||
|
||||
hmp_handle_error(mon, &error);
|
||||
}
|
||||
|
||||
void hmp_block_job_set_speed(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
Error *error = NULL;
|
||||
const char *device = qdict_get_str(qdict, "device");
|
||||
int64_t value = qdict_get_int(qdict, "value");
|
||||
|
||||
qmp_block_job_set_speed(device, value, &error);
|
||||
|
||||
hmp_handle_error(mon, &error);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue