diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-13 19:40:13 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 14:00:07 -0400 |
commit | 0152fb6b57c4fae769ee75ea2ae670f4ff39fba9 (patch) | |
tree | f59f4c6703c1914bc65607f21ae8c868b995f245 /block/blk-mq.c | |
parent | 46f92d42ee37e10970e33891b7b61a342bd97aeb (diff) |
blk-mq: pass a reserved argument to the timeout handler
Allow blk-mq to pass an argument to the timeout handler to indicate
if we're timing out a reserved or regular command. For many drivers
those need to be handled different.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 298d6e360661..d12f1983d493 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -530,7 +530,7 @@ struct blk_mq_timeout_data { | |||
530 | unsigned int next_set; | 530 | unsigned int next_set; |
531 | }; | 531 | }; |
532 | 532 | ||
533 | static void blk_mq_rq_timed_out(struct request *req) | 533 | static void blk_mq_rq_timed_out(struct request *req, bool reserved) |
534 | { | 534 | { |
535 | struct blk_mq_ops *ops = req->q->mq_ops; | 535 | struct blk_mq_ops *ops = req->q->mq_ops; |
536 | enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; | 536 | enum blk_eh_timer_return ret = BLK_EH_RESET_TIMER; |
@@ -548,7 +548,7 @@ static void blk_mq_rq_timed_out(struct request *req) | |||
548 | return; | 548 | return; |
549 | 549 | ||
550 | if (ops->timeout) | 550 | if (ops->timeout) |
551 | ret = ops->timeout(req); | 551 | ret = ops->timeout(req, reserved); |
552 | 552 | ||
553 | switch (ret) { | 553 | switch (ret) { |
554 | case BLK_EH_HANDLED: | 554 | case BLK_EH_HANDLED: |
@@ -576,7 +576,7 @@ static void blk_mq_check_expired(struct blk_mq_hw_ctx *hctx, | |||
576 | 576 | ||
577 | if (time_after_eq(jiffies, rq->deadline)) { | 577 | if (time_after_eq(jiffies, rq->deadline)) { |
578 | if (!blk_mark_rq_complete(rq)) | 578 | if (!blk_mark_rq_complete(rq)) |
579 | blk_mq_rq_timed_out(rq); | 579 | blk_mq_rq_timed_out(rq, reserved); |
580 | } else if (!data->next_set || time_after(data->next, rq->deadline)) { | 580 | } else if (!data->next_set || time_after(data->next, rq->deadline)) { |
581 | data->next = rq->deadline; | 581 | data->next = rq->deadline; |
582 | data->next_set = 1; | 582 | data->next_set = 1; |