diff options
author | Roman Pen <r.peniaev@gmail.com> | 2014-03-04 23:13:10 +0900 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-04-30 16:23:20 +0100 |
commit | 5b85afa68e4f56c27f1d5c6f49e5257bce6448e6 (patch) | |
tree | 2bcd93308d38d2fc1d5540abcdb99efe067792ff /block | |
parent | 631f96b5e27fdf9dc7b7e78201c01d05321f1494 (diff) | |
download | linux-stable-5b85afa68e4f56c27f1d5c6f49e5257bce6448e6.tar.gz linux-stable-5b85afa68e4f56c27f1d5c6f49e5257bce6448e6.tar.bz2 linux-stable-5b85afa68e4f56c27f1d5c6f49e5257bce6448e6.zip |
blktrace: fix accounting of partially completed requests
commit af5040da01ef980670b3741b3e10733ee3e33566 upstream.
trace_block_rq_complete does not take into account that request can
be partially completed, so we can get the following incorrect output
of blkparser:
C R 232 + 240 [0]
C R 240 + 232 [0]
C R 248 + 224 [0]
C R 256 + 216 [0]
but should be:
C R 232 + 8 [0]
C R 240 + 8 [0]
C R 248 + 8 [0]
C R 256 + 8 [0]
Also, the whole output summary statistics of completed requests and
final throughput will be incorrect.
This patch takes into account real completion size of the request and
fixes wrong completion accounting.
Signed-off-by: Roman Pen <r.peniaev@gmail.com>
CC: Steven Rostedt <rostedt@goodmis.org>
CC: Frederic Weisbecker <fweisbec@gmail.com>
CC: Ingo Molnar <mingo@redhat.com>
CC: linux-kernel@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@fb.com>
[bwh: Backported to 3.2: drop change in blk-mq.c]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index a219c8914daa..ec494ff6d244 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2077,7 +2077,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes) if (!req->bio) return false; - trace_block_rq_complete(req->q, req); + trace_block_rq_complete(req->q, req, nr_bytes); /* * For fs requests, rq is just carrier of independent bio's |