block: Add statistics for failed and invalid I/O operations
commit7ee12dafe96a86dfa96af38cea1289305e429a55
authorAlberto Garcia <berto@igalia.com>
Wed, 28 Oct 2015 15:33:03 +0000 (28 17:33 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 12 Nov 2015 15:22:45 +0000 (12 16:22 +0100)
tree28c88720535e3822419bec2db0ca32be053c3118
parentcb38fffbc968e797ae32039b1e2c47b940b30cb4
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>
block/accounting.c
block/qapi.c
include/block/accounting.h
qapi/block-core.json
qmp-commands.hx