aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/blkdev.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2008-12-03 06:41:26 -0500
committerJens Axboe <jens.axboe@oracle.com>2008-12-03 06:41:26 -0500
commit53a08807c01989c6847bb135d8d43f61c5dfdda5 (patch)
treee2297de901dc82a0336e6af28b594864792c585d /include/linux/blkdev.h
parentbf91db18ac2852a3ff39fe25ff56c5557c0fff78 (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 'include/linux/blkdev.h')
-rw-r--r--include/linux/blkdev.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a135256b272c..9cc7cc5fdce1 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -786,6 +786,8 @@ static inline void blk_run_address_space(struct address_space *mapping)
786 blk_run_backing_dev(mapping->backing_dev_info, NULL); 786 blk_run_backing_dev(mapping->backing_dev_info, NULL);
787} 787}
788 788
789extern void blkdev_dequeue_request(struct request *req);
790
789/* 791/*
790 * blk_end_request() and friends. 792 * blk_end_request() and friends.
791 * __blk_end_request() and end_request() must be called with 793 * __blk_end_request() and end_request() must be called with
@@ -820,11 +822,6 @@ extern void blk_update_request(struct request *rq, int error,
820extern unsigned int blk_rq_bytes(struct request *rq); 822extern unsigned int blk_rq_bytes(struct request *rq);
821extern unsigned int blk_rq_cur_bytes(struct request *rq); 823extern unsigned int blk_rq_cur_bytes(struct request *rq);
822 824
823static inline void blkdev_dequeue_request(struct request *req)
824{
825 elv_dequeue_request(req->q, req);
826}
827
828/* 825/*
829 * Access functions for manipulating queue properties 826 * Access functions for manipulating queue properties
830 */ 827 */