diff options
author | Alberto Garcia <berto@igalia.com> | 2015-10-28 17:33:04 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-12 16:22:45 +0100 |
commit | 362e9299b34b3101aaa20f20363441c9f055fa5e (patch) | |
tree | 7c5da8ee5a70455154db577a42878555d445f54c /block/qapi.c | |
parent | 7ee12dafe96a86dfa96af38cea1289305e429a55 (diff) |
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>
Diffstat (limited to 'block/qapi.c')
-rw-r--r-- | block/qapi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/qapi.c b/block/qapi.c index d1a6bdc1d2..083469abcb 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -372,6 +372,9 @@ static BlockStats *bdrv_query_stats(const BlockDriverState *bs, if (s->stats->has_idle_time_ns) { s->stats->idle_time_ns = block_acct_idle_time_ns(stats); } + + s->stats->account_invalid = stats->account_invalid; + s->stats->account_failed = stats->account_failed; } s->stats->wr_highest_offset = bs->wr_highest_offset; |