diff options
author | Tejun Heo <tj@kernel.org> | 2008-12-03 06:41:26 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-12-03 06:41:26 -0500 |
commit | 53a08807c01989c6847bb135d8d43f61c5dfdda5 (patch) | |
tree | e2297de901dc82a0336e6af28b594864792c585d /block/blk-barrier.c | |
parent | bf91db18ac2852a3ff39fe25ff56c5557c0fff78 (diff) |
block: internal dequeue shouldn't start timer
blkdev_dequeue_request() and elv_dequeue_request() are equivalent and
both start the timeout timer. Barrier code dequeues the original
barrier request but doesn't passes the request itself to lower level
driver, only broken down proxy requests; however, as the original
barrier code goes through the same dequeue path and timeout timer is
started on it. If barrier sequence takes long enough, this timer
expires but the low level driver has no idea about this request and
oops follows.
Timeout timer shouldn't have been started on the original barrier
request as it never goes through actual IO. This patch unexports
elv_dequeue_request(), which has no external user anyway, and makes it
operate on elevator proper w/o adding the timer and make
blkdev_dequeue_request() call elv_dequeue_request() and add timer.
Internal users which don't pass the request to driver - barrier code
and end_that_request_last() - are converted to use
elv_dequeue_request().
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r-- | block/blk-barrier.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 5c99ff8d2db8..6e72d661ae42 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -161,7 +161,7 @@ static inline struct request *start_ordered(struct request_queue *q, | |||
161 | /* | 161 | /* |
162 | * Prep proxy barrier request. | 162 | * Prep proxy barrier request. |
163 | */ | 163 | */ |
164 | blkdev_dequeue_request(rq); | 164 | elv_dequeue_request(q, rq); |
165 | q->orig_bar_rq = rq; | 165 | q->orig_bar_rq = rq; |
166 | rq = &q->bar_rq; | 166 | rq = &q->bar_rq; |
167 | blk_rq_init(q, rq); | 167 | blk_rq_init(q, rq); |
@@ -219,7 +219,7 @@ int blk_do_ordered(struct request_queue *q, struct request **rqp) | |||
219 | * This can happen when the queue switches to | 219 | * This can happen when the queue switches to |
220 | * ORDERED_NONE while this request is on it. | 220 | * ORDERED_NONE while this request is on it. |
221 | */ | 221 | */ |
222 | blkdev_dequeue_request(rq); | 222 | elv_dequeue_request(q, rq); |
223 | if (__blk_end_request(rq, -EOPNOTSUPP, | 223 | if (__blk_end_request(rq, -EOPNOTSUPP, |
224 | blk_rq_bytes(rq))) | 224 | blk_rq_bytes(rq))) |
225 | BUG(); | 225 | BUG(); |