summaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-07-13 21:50:21 -0600
committerMarkus Armbruster <armbru@redhat.com>2016-07-19 13:21:08 +0200
commit4dc9397b62c1a50a4afb5881abb55d07058e0812 (patch)
tree0131cba329d72bf415a99bb6fd522c09c6ac1ef0 /qapi
parentc818408e449ea55371253bd4def1c1dc87b7bb03 (diff)
downloadqemu-4dc9397b62c1a50a4afb5881abb55d07058e0812.tar.gz
qemu-4dc9397b62c1a50a4afb5881abb55d07058e0812.tar.bz2
qemu-4dc9397b62c1a50a4afb5881abb55d07058e0812.zip
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 <eblake@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <1468468228-27827-11-git-send-email-eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json20
1 files changed, 16 insertions, 4 deletions
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',