diff options
author | David S. Miller | 2008-12-15 20:03:50 -0800 |
---|---|---|
committer | David S. Miller | 2008-12-15 20:03:50 -0800 |
commit | eb14f019597cd86c21a6c601d7e900f40030c2e7 (patch) | |
tree | 36fb2f36a1747f98988f87215db1eef3a71d45eb /block/blk-core.c | |
parent | 9a4a84294b0d60b8c287131478f743ba2bc68949 (diff) | |
parent | a3dd15444baa9c7522c8457ab564c41219dfb44c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/e1000e/ich8lan.c
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 10e8a64a5a5b..c36aa98fafa3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -592,7 +592,7 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id) 1 << QUEUE_FLAG_STACKABLE); q->queue_lock = lock; - blk_queue_segment_boundary(q, 0xffffffff); + blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); blk_queue_make_request(q, __make_request); blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE); @@ -1637,6 +1637,28 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) EXPORT_SYMBOL_GPL(blk_insert_cloned_request); /** + * blkdev_dequeue_request - dequeue request and start timeout timer + * @req: request to dequeue + * + * Dequeue @req and start timeout timer on it. This hands off the + * request to the driver. + * + * Block internal functions which don't want to start timer should + * call elv_dequeue_request(). + */ +void blkdev_dequeue_request(struct request *req) +{ + elv_dequeue_request(req->q, req); + + /* + * We are now handing the request to the hardware, add the + * timeout handler. + */ + blk_add_timer(req); +} +EXPORT_SYMBOL(blkdev_dequeue_request); + +/** * __end_that_request_first - end I/O on a request * @req: the request being processed * @error: %0 for success, < %0 for error @@ -1774,7 +1796,7 @@ static void end_that_request_last(struct request *req, int error) blk_queue_end_tag(req->q, req); if (blk_queued_rq(req)) - blkdev_dequeue_request(req); + elv_dequeue_request(req->q, req); if (unlikely(laptop_mode) && blk_fs_request(req)) laptop_io_completion(); |