aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 11:53:49 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-28 11:53:49 -0400
commit28d721e24c88496ff8e9c4a0959bdc1415c0658e (patch)
tree0652161bbbcbfddf47c7ddb25d2db8ecd4cbec89 /include/linux/elevator.h
parent0ee40c6628434f0535da31deeacc28b61e80d810 (diff)
parentcb19833dccb32f97cacbfff834b53523915f13f6 (diff)
Merge branch 'generic-dispatch' of git://brick.kernel.dk/data/git/linux-2.6-block
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index ed93125c1db5..a74c27e460ba 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -8,18 +8,17 @@ typedef void (elevator_merge_req_fn) (request_queue_t *, struct request *, struc
8 8
9typedef void (elevator_merged_fn) (request_queue_t *, struct request *); 9typedef void (elevator_merged_fn) (request_queue_t *, struct request *);
10 10
11typedef struct request *(elevator_next_req_fn) (request_queue_t *); 11typedef int (elevator_dispatch_fn) (request_queue_t *, int);
12 12
13typedef void (elevator_add_req_fn) (request_queue_t *, struct request *, int); 13typedef void (elevator_add_req_fn) (request_queue_t *, struct request *);
14typedef int (elevator_queue_empty_fn) (request_queue_t *); 14typedef int (elevator_queue_empty_fn) (request_queue_t *);
15typedef void (elevator_remove_req_fn) (request_queue_t *, struct request *);
16typedef void (elevator_requeue_req_fn) (request_queue_t *, struct request *);
17typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); 15typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *);
18typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); 16typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
19typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); 17typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *);
20 18
21typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t); 19typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t);
22typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); 20typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
21typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
23typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); 22typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
24 23
25typedef int (elevator_init_fn) (request_queue_t *, elevator_t *); 24typedef int (elevator_init_fn) (request_queue_t *, elevator_t *);
@@ -31,10 +30,9 @@ struct elevator_ops
31 elevator_merged_fn *elevator_merged_fn; 30 elevator_merged_fn *elevator_merged_fn;
32 elevator_merge_req_fn *elevator_merge_req_fn; 31 elevator_merge_req_fn *elevator_merge_req_fn;
33 32
34 elevator_next_req_fn *elevator_next_req_fn; 33 elevator_dispatch_fn *elevator_dispatch_fn;
35 elevator_add_req_fn *elevator_add_req_fn; 34 elevator_add_req_fn *elevator_add_req_fn;
36 elevator_remove_req_fn *elevator_remove_req_fn; 35 elevator_activate_req_fn *elevator_activate_req_fn;
37 elevator_requeue_req_fn *elevator_requeue_req_fn;
38 elevator_deactivate_req_fn *elevator_deactivate_req_fn; 36 elevator_deactivate_req_fn *elevator_deactivate_req_fn;
39 37
40 elevator_queue_empty_fn *elevator_queue_empty_fn; 38 elevator_queue_empty_fn *elevator_queue_empty_fn;
@@ -81,15 +79,15 @@ struct elevator_queue
81/* 79/*
82 * block elevator interface 80 * block elevator interface
83 */ 81 */
82extern void elv_dispatch_sort(request_queue_t *, struct request *);
84extern void elv_add_request(request_queue_t *, struct request *, int, int); 83extern void elv_add_request(request_queue_t *, struct request *, int, int);
85extern void __elv_add_request(request_queue_t *, struct request *, int, int); 84extern void __elv_add_request(request_queue_t *, struct request *, int, int);
86extern int elv_merge(request_queue_t *, struct request **, struct bio *); 85extern int elv_merge(request_queue_t *, struct request **, struct bio *);
87extern void elv_merge_requests(request_queue_t *, struct request *, 86extern void elv_merge_requests(request_queue_t *, struct request *,
88 struct request *); 87 struct request *);
89extern void elv_merged_request(request_queue_t *, struct request *); 88extern void elv_merged_request(request_queue_t *, struct request *);
90extern void elv_remove_request(request_queue_t *, struct request *); 89extern void elv_dequeue_request(request_queue_t *, struct request *);
91extern void elv_requeue_request(request_queue_t *, struct request *); 90extern void elv_requeue_request(request_queue_t *, struct request *);
92extern void elv_deactivate_request(request_queue_t *, struct request *);
93extern int elv_queue_empty(request_queue_t *); 91extern int elv_queue_empty(request_queue_t *);
94extern struct request *elv_next_request(struct request_queue *q); 92extern struct request *elv_next_request(struct request_queue *q);
95extern struct request *elv_former_request(request_queue_t *, struct request *); 93extern struct request *elv_former_request(request_queue_t *, struct request *);
@@ -142,4 +140,6 @@ enum {
142 ELV_MQUEUE_MUST, 140 ELV_MQUEUE_MUST,
143}; 141};
144 142
143#define rq_end_sector(rq) ((rq)->sector + (rq)->nr_sectors)
144
145#endif 145#endif