diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-29 09:52:33 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-05-29 10:59:21 -0400 |
commit | 0df0bb080aca8b3d0f06d9e7d04b07e9ff755ab1 (patch) | |
tree | 9fb16b30b76b3bb55ed241fa90eaa6b227a46a7a /drivers/block | |
parent | c5fb85b7ff7648a8b51af2062b9242a83d513b68 (diff) |
null_blk: complete requests from ->timeout
By completing the request entirely in the driver we can remove the
BLK_EH_HANDLED return value and thus the split responsibility between the
driver and the block layer that has been causing trouble.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/null_blk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index b4d368e3ddcd..2bdadd7f1454 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c | |||
@@ -1365,7 +1365,8 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio) | |||
1365 | static enum blk_eh_timer_return null_rq_timed_out_fn(struct request *rq) | 1365 | static enum blk_eh_timer_return null_rq_timed_out_fn(struct request *rq) |
1366 | { | 1366 | { |
1367 | pr_info("null: rq %p timed out\n", rq); | 1367 | pr_info("null: rq %p timed out\n", rq); |
1368 | return BLK_EH_HANDLED; | 1368 | blk_mq_complete_request(rq); |
1369 | return BLK_EH_DONE; | ||
1369 | } | 1370 | } |
1370 | 1371 | ||
1371 | static int null_rq_prep_fn(struct request_queue *q, struct request *req) | 1372 | static int null_rq_prep_fn(struct request_queue *q, struct request *req) |
@@ -1427,7 +1428,8 @@ static void null_request_fn(struct request_queue *q) | |||
1427 | static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res) | 1428 | static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res) |
1428 | { | 1429 | { |
1429 | pr_info("null: rq %p timed out\n", rq); | 1430 | pr_info("null: rq %p timed out\n", rq); |
1430 | return BLK_EH_HANDLED; | 1431 | blk_mq_complete_request(rq); |
1432 | return BLK_EH_DONE; | ||
1431 | } | 1433 | } |
1432 | 1434 | ||
1433 | static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx, | 1435 | static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx, |