diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-12-18 15:54:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-18 15:54:49 -0500 |
commit | d110ec3a1e1f522e2e9dfceb9c36d6590c26d2d4 (patch) | |
tree | 86b2f8f1d22b74b05239525c55bd42e3db6afc03 /block/blk-core.c | |
parent | 343e9099c8152daff20e10d6269edec21da44fc0 (diff) | |
parent | 55dac3a5553b13891f0ae4bbd11920619b5436d4 (diff) |
Merge branch 'linus' into core/rcu
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index c3df30cfb3fc..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 |
@@ -1770,17 +1792,17 @@ static void end_that_request_last(struct request *req, int error) | |||
1770 | { | 1792 | { |
1771 | struct gendisk *disk = req->rq_disk; | 1793 | struct gendisk *disk = req->rq_disk; |
1772 | 1794 | ||
1773 | blk_delete_timer(req); | ||
1774 | |||
1775 | if (blk_rq_tagged(req)) | 1795 | if (blk_rq_tagged(req)) |
1776 | blk_queue_end_tag(req->q, req); | 1796 | blk_queue_end_tag(req->q, req); |
1777 | 1797 | ||
1778 | if (blk_queued_rq(req)) | 1798 | if (blk_queued_rq(req)) |
1779 | blkdev_dequeue_request(req); | 1799 | elv_dequeue_request(req->q, req); |
1780 | 1800 | ||
1781 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 1801 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
1782 | laptop_io_completion(); | 1802 | laptop_io_completion(); |
1783 | 1803 | ||
1804 | blk_delete_timer(req); | ||
1805 | |||
1784 | /* | 1806 | /* |
1785 | * Account IO completion. bar_rq isn't accounted as a normal | 1807 | * Account IO completion. bar_rq isn't accounted as a normal |
1786 | * IO on queueing nor completion. Accounting the containing | 1808 | * IO on queueing nor completion. Accounting the containing |