diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-12-08 11:18:47 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-12-08 11:18:47 -0500 |
commit | c35fa3ea1ae8198bd65c2c6e59d9ebd68c115a59 (patch) | |
tree | 878768b69df25459b448aa890352342c4a3c6e2d /block/blk-core.c | |
parent | dcc7461eef7341e84e2f7274f904ce01a43b2506 (diff) | |
parent | 218d11a8b071b23b76c484fd5f72a4fe3306801e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-upstream
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) | |||
592 | 1 << QUEUE_FLAG_STACKABLE); | 592 | 1 << QUEUE_FLAG_STACKABLE); |
593 | q->queue_lock = lock; | 593 | q->queue_lock = lock; |
594 | 594 | ||
595 | blk_queue_segment_boundary(q, 0xffffffff); | 595 | blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); |
596 | 596 | ||
597 | blk_queue_make_request(q, __make_request); | 597 | blk_queue_make_request(q, __make_request); |
598 | blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE); | 598 | 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) | |||
1637 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); | 1637 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); |
1638 | 1638 | ||
1639 | /** | 1639 | /** |
1640 | * blkdev_dequeue_request - dequeue request and start timeout timer | ||
1641 | * @req: request to dequeue | ||
1642 | * | ||
1643 | * Dequeue @req and start timeout timer on it. This hands off the | ||
1644 | * request to the driver. | ||
1645 | * | ||
1646 | * Block internal functions which don't want to start timer should | ||
1647 | * call elv_dequeue_request(). | ||
1648 | */ | ||
1649 | void blkdev_dequeue_request(struct request *req) | ||
1650 | { | ||
1651 | elv_dequeue_request(req->q, req); | ||
1652 | |||
1653 | /* | ||
1654 | * We are now handing the request to the hardware, add the | ||
1655 | * timeout handler. | ||
1656 | */ | ||
1657 | blk_add_timer(req); | ||
1658 | } | ||
1659 | EXPORT_SYMBOL(blkdev_dequeue_request); | ||
1660 | |||
1661 | /** | ||
1640 | * __end_that_request_first - end I/O on a request | 1662 | * __end_that_request_first - end I/O on a request |
1641 | * @req: the request being processed | 1663 | * @req: the request being processed |
1642 | * @error: %0 for success, < %0 for error | 1664 | * @error: %0 for success, < %0 for error |
@@ -1774,7 +1796,7 @@ static void end_that_request_last(struct request *req, int error) | |||
1774 | blk_queue_end_tag(req->q, req); | 1796 | blk_queue_end_tag(req->q, req); |
1775 | 1797 | ||
1776 | if (blk_queued_rq(req)) | 1798 | if (blk_queued_rq(req)) |
1777 | blkdev_dequeue_request(req); | 1799 | elv_dequeue_request(req->q, req); |
1778 | 1800 | ||
1779 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 1801 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
1780 | laptop_io_completion(); | 1802 | laptop_io_completion(); |