[PATCH] generic dispatch fixes
- Split elv_dispatch_insert() into two functions - Rename rq_last_sector() to rq_end_sector() Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
@@ -337,7 +337,7 @@ struct request_queue
|
||||
/*
|
||||
* Dispatch queue sorting
|
||||
*/
|
||||
sector_t last_sector;
|
||||
sector_t end_sector;
|
||||
struct request *boundary_rq;
|
||||
unsigned int max_back_kb;
|
||||
|
||||
@@ -624,6 +624,17 @@ static inline void blkdev_dequeue_request(struct request *req)
|
||||
elv_dequeue_request(req->q, req);
|
||||
}
|
||||
|
||||
/*
|
||||
* This should be in elevator.h, but that requires pulling in rq and q
|
||||
*/
|
||||
static inline void elv_dispatch_add_tail(struct request_queue *q,
|
||||
struct request *rq)
|
||||
{
|
||||
q->end_sector = rq_end_sector(rq);
|
||||
q->boundary_rq = rq;
|
||||
list_add_tail(&rq->queuelist, &q->queue_head);
|
||||
}
|
||||
|
||||
/*
|
||||
* Access functions for manipulating queue properties
|
||||
*/
|
||||
|
Reference in New Issue
Block a user