block: Add idle_time_ns to BlockDeviceStats
This patch adds the new field 'idle_time_ns' to the BlockDeviceStats structure, indicating the time that has passed since the previous I/O operation. It also adds the block_acct_idle_time_ns() call, to ensure that all references to the clock type used for accounting are in the same place. This will later allow us to use a different clock for iotests. Signed-off-by: Alberto Garcia <berto@igalia.com> Message-id: 7d8cfcf931453e1a2443e6626e8c1edc347c7c8a.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:
1 parent
bd797fc15b
commit
cb38fffbc9
6 files changed
+33
-6
No files matched your search
@@ -448,6 +448,10 @@
|
||||
# @wr_merged: Number of write requests that have been merged into another
|
||||
# request (Since 2.3).
|
||||
#
|
||||
# @idle_time_ns: #optional Time since the last I/O operation, in
|
||||
# nanoseconds. If the field is absent it means that
|
||||
# there haven't been any operations yet (Since 2.5).
|
||||
#
|
||||
# Since: 0.14.0
|
||||
##
|
||||
{ 'struct': 'BlockDeviceStats',
|
||||
@@ -455,7 +459,7 @@
|
||||
'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' } }
|
||||
'rd_merged': 'int', 'wr_merged': 'int', '*idle_time_ns': 'int' } }
|
||||
|
||||
##
|
||||
# @BlockStats:
|
||||
|
||||
Reference in new issue
Block a user