Skip to content

Commit 0df0bb0

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent c5fb85b commit 0df0bb0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎drivers/block/null_blk.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,8 @@ static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio)
13651365
static enum blk_eh_timer_return null_rq_timed_out_fn(struct request *rq)
13661366
{
13671367
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;
13691370
}
13701371

13711372
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)
14271428
static enum blk_eh_timer_return null_timeout_rq(struct request *rq, bool res)
14281429
{
14291430
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;
14311433
}
14321434

14331435
static blk_status_t null_queue_rq(struct blk_mq_hw_ctx *hctx,

0 commit comments

Comments
 (0)