diff options
author | Christoph Hellwig <hch@lst.de> | 2014-09-13 19:40:12 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-22 14:00:07 -0400 |
commit | 46f92d42ee37e10970e33891b7b61a342bd97aeb (patch) | |
tree | f8e8a59f0daa0c0fa4406a34b120d1d67b9a1c22 /block/blk-timeout.c | |
parent | 81481eb423c295c5480a3fab9bb961cf286c91e7 (diff) |
blk-mq: unshared timeout handler
Duplicate the (small) timeout handler in blk-mq so that we can pass
arguments more easily to the driver timeout handler. This enables
the next patch.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-timeout.c')
-rw-r--r-- | block/blk-timeout.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/blk-timeout.c b/block/blk-timeout.c index 95a09590ccfd..4d448259e622 100644 --- a/block/blk-timeout.c +++ b/block/blk-timeout.c | |||
@@ -7,7 +7,6 @@ | |||
7 | #include <linux/fault-inject.h> | 7 | #include <linux/fault-inject.h> |
8 | 8 | ||
9 | #include "blk.h" | 9 | #include "blk.h" |
10 | #include "blk-mq.h" | ||
11 | 10 | ||
12 | #ifdef CONFIG_FAIL_IO_TIMEOUT | 11 | #ifdef CONFIG_FAIL_IO_TIMEOUT |
13 | 12 | ||
@@ -90,10 +89,7 @@ static void blk_rq_timed_out(struct request *req) | |||
90 | switch (ret) { | 89 | switch (ret) { |
91 | case BLK_EH_HANDLED: | 90 | case BLK_EH_HANDLED: |
92 | /* Can we use req->errors here? */ | 91 | /* Can we use req->errors here? */ |
93 | if (q->mq_ops) | 92 | __blk_complete_request(req); |
94 | __blk_mq_complete_request(req); | ||
95 | else | ||
96 | __blk_complete_request(req); | ||
97 | break; | 93 | break; |
98 | case BLK_EH_RESET_TIMER: | 94 | case BLK_EH_RESET_TIMER: |
99 | blk_add_timer(req); | 95 | blk_add_timer(req); |
@@ -113,7 +109,7 @@ static void blk_rq_timed_out(struct request *req) | |||
113 | } | 109 | } |
114 | } | 110 | } |
115 | 111 | ||
116 | void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, | 112 | static void blk_rq_check_expired(struct request *rq, unsigned long *next_timeout, |
117 | unsigned int *next_set) | 113 | unsigned int *next_set) |
118 | { | 114 | { |
119 | if (time_after_eq(jiffies, rq->deadline)) { | 115 | if (time_after_eq(jiffies, rq->deadline)) { |