diff options
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 0c06cf5aaaf8..561e8a1b43a4 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -600,7 +600,7 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id) | |||
600 | 1 << QUEUE_FLAG_STACKABLE); | 600 | 1 << QUEUE_FLAG_STACKABLE); |
601 | q->queue_lock = lock; | 601 | q->queue_lock = lock; |
602 | 602 | ||
603 | blk_queue_segment_boundary(q, 0xffffffff); | 603 | blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); |
604 | 604 | ||
605 | blk_queue_make_request(q, __make_request); | 605 | blk_queue_make_request(q, __make_request); |
606 | blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE); | 606 | blk_queue_max_segment_size(q, MAX_SEGMENT_SIZE); |
@@ -1645,6 +1645,28 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) | |||
1645 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); | 1645 | EXPORT_SYMBOL_GPL(blk_insert_cloned_request); |
1646 | 1646 | ||
1647 | /** | 1647 | /** |
1648 | * blkdev_dequeue_request - dequeue request and start timeout timer | ||
1649 | * @req: request to dequeue | ||
1650 | * | ||
1651 | * Dequeue @req and start timeout timer on it. This hands off the | ||
1652 | * request to the driver. | ||
1653 | * | ||
1654 | * Block internal functions which don't want to start timer should | ||
1655 | * call elv_dequeue_request(). | ||
1656 | */ | ||
1657 | void blkdev_dequeue_request(struct request *req) | ||
1658 | { | ||
1659 | elv_dequeue_request(req->q, req); | ||
1660 | |||
1661 | /* | ||
1662 | * We are now handing the request to the hardware, add the | ||
1663 | * timeout handler. | ||
1664 | */ | ||
1665 | blk_add_timer(req); | ||
1666 | } | ||
1667 | EXPORT_SYMBOL(blkdev_dequeue_request); | ||
1668 | |||
1669 | /** | ||
1648 | * __end_that_request_first - end I/O on a request | 1670 | * __end_that_request_first - end I/O on a request |
1649 | * @req: the request being processed | 1671 | * @req: the request being processed |
1650 | * @error: %0 for success, < %0 for error | 1672 | * @error: %0 for success, < %0 for error |
@@ -1782,7 +1804,7 @@ static void end_that_request_last(struct request *req, int error) | |||
1782 | blk_queue_end_tag(req->q, req); | 1804 | blk_queue_end_tag(req->q, req); |
1783 | 1805 | ||
1784 | if (blk_queued_rq(req)) | 1806 | if (blk_queued_rq(req)) |
1785 | blkdev_dequeue_request(req); | 1807 | elv_dequeue_request(req->q, req); |
1786 | 1808 | ||
1787 | if (unlikely(laptop_mode) && blk_fs_request(req)) | 1809 | if (unlikely(laptop_mode) && blk_fs_request(req)) |
1788 | laptop_io_completion(); | 1810 | laptop_io_completion(); |