aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-10-20 10:37:00 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2005-10-28 02:44:37 -0400
commit1b47f531e244e339b648dfff071c086f936e49e1 (patch)
tree4ecbec3d9ade19e01a47c562772db550daadcef2 /include/linux
parent8922e16cf6269e668123acb1ae1fdc62b7a3a4fc (diff)
[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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blkdev.h13
-rw-r--r--include/linux/elevator.h4
2 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 2c7b9154927a..a2e496f285a4 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -337,7 +337,7 @@ struct request_queue
337 /* 337 /*
338 * Dispatch queue sorting 338 * Dispatch queue sorting
339 */ 339 */
340 sector_t last_sector; 340 sector_t end_sector;
341 struct request *boundary_rq; 341 struct request *boundary_rq;
342 unsigned int max_back_kb; 342 unsigned int max_back_kb;
343 343
@@ -625,6 +625,17 @@ static inline void blkdev_dequeue_request(struct request *req)
625} 625}
626 626
627/* 627/*
628 * This should be in elevator.h, but that requires pulling in rq and q
629 */
630static inline void elv_dispatch_add_tail(struct request_queue *q,
631 struct request *rq)
632{
633 q->end_sector = rq_end_sector(rq);
634 q->boundary_rq = rq;
635 list_add_tail(&rq->queuelist, &q->queue_head);
636}
637
638/*
628 * Access functions for manipulating queue properties 639 * Access functions for manipulating queue properties
629 */ 640 */
630extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn, 641extern request_queue_t *blk_init_queue_node(request_fn_proc *rfn,
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 76f4f6920744..f9b5ec38121a 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -79,7 +79,7 @@ struct elevator_queue
79/* 79/*
80 * block elevator interface 80 * block elevator interface
81 */ 81 */
82extern void elv_dispatch_insert(request_queue_t *, struct request *, int); 82extern void elv_dispatch_sort(request_queue_t *, struct request *);
83extern void elv_add_request(request_queue_t *, struct request *, int, int); 83extern void elv_add_request(request_queue_t *, struct request *, int, int);
84extern void __elv_add_request(request_queue_t *, struct request *, int, int); 84extern void __elv_add_request(request_queue_t *, struct request *, int, int);
85extern int elv_merge(request_queue_t *, struct request **, struct bio *); 85extern int elv_merge(request_queue_t *, struct request **, struct bio *);
@@ -140,4 +140,6 @@ enum {
140 ELV_MQUEUE_MUST, 140 ELV_MQUEUE_MUST,
141}; 141};
142 142
143#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
144
143#endif 145#endif