diff options
author | Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> | 2012-01-18 14:40:47 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-01-26 14:49:17 +0100 |
commit | 2d47c6e9aa2475807913bd46dfca55980cca9fb4 (patch) | |
tree | 24c53c3bf120c063fc6ab0da03de7c715fe77138 /hmp.c | |
parent | 12bd451fe0be83474910bb63b5874458141d4230 (diff) |
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>
Diffstat (limited to 'hmp.c')
-rw-r--r-- | hmp.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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); +} |