diff options
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index ea6bbc2d7407..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 | ||
9 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *); | 9 | typedef void (elevator_merged_fn) (request_queue_t *, struct request *); |
10 | 10 | ||
11 | typedef struct request *(elevator_next_req_fn) (request_queue_t *); | 11 | typedef int (elevator_dispatch_fn) (request_queue_t *, int); |
12 | 12 | ||
13 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *, int); | 13 | typedef void (elevator_add_req_fn) (request_queue_t *, struct request *); |
14 | typedef int (elevator_queue_empty_fn) (request_queue_t *); | 14 | typedef int (elevator_queue_empty_fn) (request_queue_t *); |
15 | typedef void (elevator_remove_req_fn) (request_queue_t *, struct request *); | ||
16 | typedef void (elevator_requeue_req_fn) (request_queue_t *, struct request *); | ||
17 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); | 15 | typedef struct request *(elevator_request_list_fn) (request_queue_t *, struct request *); |
18 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); | 16 | typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *); |
19 | typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); | 17 | typedef int (elevator_may_queue_fn) (request_queue_t *, int, struct bio *); |
20 | 18 | ||
21 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, int); | 19 | typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, struct bio *, gfp_t); |
22 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); | 20 | typedef void (elevator_put_req_fn) (request_queue_t *, struct request *); |
21 | typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *); | ||
23 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); | 22 | typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *); |
24 | 23 | ||
25 | typedef int (elevator_init_fn) (request_queue_t *, elevator_t *); | 24 | typedef 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 | */ |
82 | extern void elv_dispatch_sort(request_queue_t *, struct request *); | ||
84 | extern void elv_add_request(request_queue_t *, struct request *, int, int); | 83 | extern void elv_add_request(request_queue_t *, struct request *, int, int); |
85 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); | 84 | extern void __elv_add_request(request_queue_t *, struct request *, int, int); |
86 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); | 85 | extern int elv_merge(request_queue_t *, struct request **, struct bio *); |
87 | extern void elv_merge_requests(request_queue_t *, struct request *, | 86 | extern void elv_merge_requests(request_queue_t *, struct request *, |
88 | struct request *); | 87 | struct request *); |
89 | extern void elv_merged_request(request_queue_t *, struct request *); | 88 | extern void elv_merged_request(request_queue_t *, struct request *); |
90 | extern void elv_remove_request(request_queue_t *, struct request *); | 89 | extern void elv_dequeue_request(request_queue_t *, struct request *); |
91 | extern void elv_requeue_request(request_queue_t *, struct request *); | 90 | extern void elv_requeue_request(request_queue_t *, struct request *); |
92 | extern void elv_deactivate_request(request_queue_t *, struct request *); | ||
93 | extern int elv_queue_empty(request_queue_t *); | 91 | extern int elv_queue_empty(request_queue_t *); |
94 | extern struct request *elv_next_request(struct request_queue *q); | 92 | extern struct request *elv_next_request(struct request_queue *q); |
95 | extern struct request *elv_former_request(request_queue_t *, struct request *); | 93 | extern struct request *elv_former_request(request_queue_t *, struct request *); |
@@ -98,7 +96,7 @@ extern int elv_register_queue(request_queue_t *q); | |||
98 | extern void elv_unregister_queue(request_queue_t *q); | 96 | extern void elv_unregister_queue(request_queue_t *q); |
99 | extern int elv_may_queue(request_queue_t *, int, struct bio *); | 97 | extern int elv_may_queue(request_queue_t *, int, struct bio *); |
100 | extern void elv_completed_request(request_queue_t *, struct request *); | 98 | extern void elv_completed_request(request_queue_t *, struct request *); |
101 | extern int elv_set_request(request_queue_t *, struct request *, struct bio *, int); | 99 | extern int elv_set_request(request_queue_t *, struct request *, struct bio *, gfp_t); |
102 | extern void elv_put_request(request_queue_t *, struct request *); | 100 | extern void elv_put_request(request_queue_t *, struct request *); |
103 | 101 | ||
104 | /* | 102 | /* |
@@ -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 |