diff options
author | Christoph Hellwig <hch@lst.de> | 2020-06-03 07:14:43 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-04 21:16:11 -0600 |
commit | d24de76af836260a99ca2ba281a937bd5bc55591 (patch) | |
tree | 3e0982ad803e59fa210695684cfd58820cf9f86d /kernel/trace | |
parent | 6ac92fb5cdff6e5708199f1d5d9d58011ccc76a0 (diff) | |
download | linux-stable-d24de76af836260a99ca2ba281a937bd5bc55591.tar.gz linux-stable-d24de76af836260a99ca2ba281a937bd5bc55591.tar.bz2 linux-stable-d24de76af836260a99ca2ba281a937bd5bc55591.zip |
block: remove the error argument to the block_bio_complete tracepoint
The status can be trivially derived from the bio itself. That also avoid
callers like NVMe to incorrectly pass a blk_status_t instead of the errno,
and the overhead of translating the blk_status_t to the errno in the I/O
completion fast path when no tracing is enabled.
Fixes: 35fe0d12c8a3 ("nvme: trace bio completion")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/blktrace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index ea47f2084087..1e5499414cdf 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -885,10 +885,10 @@ static void blk_add_trace_bio_bounce(void *ignore, } static void blk_add_trace_bio_complete(void *ignore, - struct request_queue *q, struct bio *bio, - int error) + struct request_queue *q, struct bio *bio) { - blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, error); + blk_add_trace_bio(q, bio, BLK_TA_COMPLETE, + blk_status_to_errno(bio->bi_status)); } static void blk_add_trace_bio_backmerge(void *ignore, |