block: Add idle_time_ns to BlockDeviceStats
commitcb38fffbc968e797ae32039b1e2c47b940b30cb4
authorAlberto Garcia <berto@igalia.com>
Wed, 28 Oct 2015 15:33:02 +0000 (28 17:33 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Nov 2015 15:22:45 +0000 (12 16:22 +0100)
treed28bdc71d24992460b50951def2de9c3a129f2c3
parentbd797fc15b4290e02c219b7cd6289a33cd6cd18b
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>
block/accounting.c
block/qapi.c
hmp.c
include/block/accounting.h
qapi/block-core.json
qmp-commands.hx