|
@@ -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);
|
|
@@ -1636,6 +1636,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
|
|
@@ -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();
|