From 4dc9397b62c1a50a4afb5881abb55d07058e0812 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 13 Jul 2016 21:50:21 -0600 Subject: block: Simplify block_set_io_throttle Now that we can support boxed commands, use it to greatly reduce the number of parameters (and likelihood of getting out of sync) when adjusting throttle parameters. Signed-off-by: Eric Blake Reviewed-by: Alberto Garcia Message-Id: <1468468228-27827-11-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qapi/block-core.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 3444a9bc3e..3d4b071385 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1330,6 +1330,21 @@ # the device will be removed from its group and the rest of its # members will not be affected. The 'group' parameter is ignored. # +# See BlockIOThrottle for parameter descriptions. +# +# Returns: Nothing on success +# If @device is not a valid block device, DeviceNotFound +# +# Since: 1.1 +## +{ 'command': 'block_set_io_throttle', 'boxed': true, + 'data': 'BlockIOThrottle' } + +## +# BlockIOThrottle +# +# A set of parameters describing block throttling. +# # @device: The name of the device # # @bps: total throughput limit in bytes per second @@ -1396,12 +1411,9 @@ # # @group: #optional throttle group name (Since 2.4) # -# Returns: Nothing on success -# If @device is not a valid block device, DeviceNotFound -# # Since: 1.1 ## -{ 'command': 'block_set_io_throttle', +{ 'struct': 'BlockIOThrottle', 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', '*bps_max': 'int', '*bps_rd_max': 'int', -- cgit v1.2.3