hmp: fix block_set_io_throttle
PATCH 1/1 hmp: fix block_set_io_throttle
Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'"
---
hmp.c | 1 + 1 file changed, 1 insertion(+)
hmp.c +1 -0
@@ -1551,6 +1551,7 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict) {Error *err =NULL ;BlockIOThrottle throttle = { + .has_device = true, .device = (char *)qdict_get_str (qdict,"device" ), .bps =qdict_get_int (qdict,"bps" ), .bps_rd =qdict_get_int (qdict,"bps_rd" ),
Signature · 1 line
2.9.3
Quoted 11 lines · Eric Blake
Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set
has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'"Signed-off-by Eric Blake <[email protected]>---
hmp.c | 1 + 1 file changed, 1 insertion(+)
Quoted 7 lines · * Eric Blake ([email protected]) wrote:
Commit 7a9877a made the 'device' parameter to BlockIOThrottle optional, favoring 'id' instead. But it forgot to update the HMP usage to set
has_device, which makes all attempts to change throttling via HMP fail with "Need exactly one of 'device' and 'id'"Signed-off-by Eric Blake <[email protected]>
Queued for HMP
Quoted 21 lines
---
hmp.c | 1 + 1 file changed, 1 insertion(+)hmp.c +1
-0@@ -1551,6 +1551,7 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict) {Error *err =NULL ;BlockIOThrottle throttle = { + .has_device = true, .device = (char *)qdict_get_str (qdict,"device" ), .bps =qdict_get_int (qdict,"bps" ), .bps_rd =qdict_get_int (qdict,"bps_rd" ),Signature · 1 line
2.9.3
--
Dr. David Alan Gilbert / [email protected] / Manchester, UK