aboutsummaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
Diffstat (limited to 'qapi/block-core.json')
-rw-r--r--qapi/block-core.json36
1 files changed, 33 insertions, 3 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index a14e6ab1f..6e8db1586 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -183,6 +183,22 @@
'*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
##
+# @BlockdevCacheInfo
+#
+# Cache mode information for a block device
+#
+# @writeback: true if writeback mode is enabled
+# @direct: true if the host page cache is bypassed (O_DIRECT)
+# @no-flush: true if flush requests are ignored for the device
+#
+# Since: 2.3
+##
+{ 'type': 'BlockdevCacheInfo',
+ 'data': { 'writeback': 'bool',
+ 'direct': 'bool',
+ 'no-flush': 'bool' } }
+
+##
# @BlockDeviceInfo:
#
# Information about the backing device for a block device.
@@ -239,6 +255,8 @@
#
# @iops_size: #optional an I/O size in bytes (Since 1.7)
#
+# @cache: the cache mode used for the block device (since: 2.3)
+#
# Since: 0.14.0
#
##
@@ -253,7 +271,7 @@
'*bps_max': 'int', '*bps_rd_max': 'int',
'*bps_wr_max': 'int', '*iops_max': 'int',
'*iops_rd_max': 'int', '*iops_wr_max': 'int',
- '*iops_size': 'int' } }
+ '*iops_size': 'int', 'cache': 'BlockdevCacheInfo' } }
##
# @BlockDeviceIoStatus:
@@ -405,6 +423,8 @@
# @device: #optional If the stats are for a virtual block device, the name
# corresponding to the virtual block device.
#
+# @device: #optional The node name of the device. (Since 2.3)
+#
# @stats: A @BlockDeviceStats for the device.
#
# @parent: #optional This describes the file block device if it has one.
@@ -415,7 +435,8 @@
# Since: 0.14.0
##
{ 'type': 'BlockStats',
- 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
+ 'data': {'*device': 'str', '*node-name': 'str',
+ 'stats': 'BlockDeviceStats',
'*parent': 'BlockStats',
'*backing': 'BlockStats'} }
@@ -424,11 +445,20 @@
#
# Query the @BlockStats for all virtual block devices.
#
+# @query-nodes: #optional If true, the command will query all the block nodes
+# that have a node name, in a list which will include "parent"
+# information, but not "backing".
+# If false or omitted, the behavior is as before - query all the
+# device backends, recursively including their "parent" and
+# "backing". (Since 2.3)
+#
# Returns: A list of @BlockStats for each virtual block devices.
#
# Since: 0.14.0
##
-{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
+{ 'command': 'query-blockstats',
+ 'data': { '*query-nodes': 'bool' },
+ 'returns': ['BlockStats'] }
##
# @BlockdevOnError: