diff options
author | Alberto Garcia | 2015-10-28 16:33:03 +0100 |
---|---|---|
committer | Kevin Wolf | 2015-11-12 16:22:45 +0100 |
commit | 7ee12dafe96a86dfa96af38cea1289305e429a55 (patch) | |
tree | 28c88720535e3822419bec2db0ca32be053c3118 /qapi | |
parent | block: Add idle_time_ns to BlockDeviceStats (diff) | |
download | qemu-7ee12dafe96a86dfa96af38cea1289305e429a55.tar.gz qemu-7ee12dafe96a86dfa96af38cea1289305e429a55.tar.xz qemu-7ee12dafe96a86dfa96af38cea1289305e429a55.zip |
block: Add statistics for failed and invalid I/O operations
This patch adds the block_acct_failed() and block_acct_invalid()
functions to allow keeping track of failed and invalid I/O operations.
The number of failed and invalid operations is exposed in
BlockDeviceStats.
We don't keep track of the time spent on invalid operations because
they are cancelled immediately when they are started.
Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: a7256ccb883a86356b1c6c46b5a29ed5448546a5.1446044837.git.berto@igalia.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r-- | qapi/block-core.json | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json index 597281821b..009b7c88f9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -452,6 +452,24 @@ # nanoseconds. If the field is absent it means that # there haven't been any operations yet (Since 2.5). # +# @failed_rd_operations: The number of failed read operations +# performed by the device (Since 2.5) +# +# @failed_wr_operations: The number of failed write operations +# performed by the device (Since 2.5) +# +# @failed_flush_operations: The number of failed flush operations +# performed by the device (Since 2.5) +# +# @invalid_rd_operations: The number of invalid read operations +# performed by the device (Since 2.5) +# +# @invalid_wr_operations: The number of invalid write operations +# performed by the device (Since 2.5) +# +# @invalid_flush_operations: The number of invalid flush operations +# performed by the device (Since 2.5) +# # Since: 0.14.0 ## { 'struct': 'BlockDeviceStats', @@ -459,7 +477,10 @@ 'wr_operations': 'int', 'flush_operations': 'int', 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int', 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int', - 'rd_merged': 'int', 'wr_merged': 'int', '*idle_time_ns': 'int' } } + 'rd_merged': 'int', 'wr_merged': 'int', '*idle_time_ns': 'int', + 'failed_rd_operations': 'int', 'failed_wr_operations': 'int', + 'failed_flush_operations': 'int', 'invalid_rd_operations': 'int', + 'invalid_wr_operations': 'int', 'invalid_flush_operations': 'int' } } ## # @BlockStats: |