mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
block: Allow configuring whether to account failed and invalid ops
This patch adds two options, "stats-account-invalid" and "stats-account-failed", that can be used to decide whether invalid and failed I/O operations must be used when collecting statistics for latency and last access time. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: ebc7e5966511a342cad428a392c5f5ad56b15213.1446044837.git.berto@igalia.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
7ee12dafe9
commit
362e9299b3
6 changed files with 79 additions and 11 deletions
|
@ -470,6 +470,12 @@
|
|||
# @invalid_flush_operations: The number of invalid flush operations
|
||||
# performed by the device (Since 2.5)
|
||||
#
|
||||
# @account_invalid: Whether invalid operations are included in the
|
||||
# last access statistics (Since 2.5)
|
||||
#
|
||||
# @account_failed: Whether failed operations are included in the
|
||||
# latency and last access statistics (Since 2.5)
|
||||
#
|
||||
# Since: 0.14.0
|
||||
##
|
||||
{ 'struct': 'BlockDeviceStats',
|
||||
|
@ -480,7 +486,8 @@
|
|||
'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' } }
|
||||
'invalid_wr_operations': 'int', 'invalid_flush_operations': 'int',
|
||||
'account_invalid': 'bool', 'account_failed': 'bool' } }
|
||||
|
||||
##
|
||||
# @BlockStats:
|
||||
|
@ -1461,6 +1468,12 @@
|
|||
# (default: enospc)
|
||||
# @read-only: #optional whether the block device should be read-only
|
||||
# (default: false)
|
||||
# @stats-account-invalid: #optional whether to include invalid
|
||||
# operations when computing last access statistics
|
||||
# (default: true) (Since 2.5)
|
||||
# @stats-account-failed: #optional whether to include failed
|
||||
# operations when computing latency and last
|
||||
# access statistics (default: true) (Since 2.5)
|
||||
# @detect-zeroes: #optional detect and optimize zero writes (Since 2.1)
|
||||
# (default: off)
|
||||
#
|
||||
|
@ -1476,6 +1489,8 @@
|
|||
'*rerror': 'BlockdevOnError',
|
||||
'*werror': 'BlockdevOnError',
|
||||
'*read-only': 'bool',
|
||||
'*stats-account-invalid': 'bool',
|
||||
'*stats-account-failed': 'bool',
|
||||
'*detect-zeroes': 'BlockdevDetectZeroesOptions' } }
|
||||
|
||||
##
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue