diff options
author | Tejun Heo <tj@kernel.org> | 2011-12-13 18:33:42 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-12-13 18:33:42 -0500 |
commit | 9b84cacd013996f244d85b3d873287c2a8f88658 (patch) | |
tree | a11b850f9c8b182a7a8141276244a831aaae5291 /include/linux/elevator.h | |
parent | 7e5a8794492e43e9eebb68a98a23be055888ccd0 (diff) |
block, cfq: restructure io_cq creation path for io_context interface cleanup
Add elevator_ops->elevator_init_icq_fn() and restructure
cfq_create_cic() and rename it to ioc_create_icq().
The new function expects its caller to pass in io_context, uses
elevator_type->icq_cache, handles generic init, calls the new elevator
operation for elevator specific initialization, and returns pointer to
created or looked up icq. This leaves cfq_icq_pool variable without
any user. Removed.
This prepares for io_context interface cleanup and doesn't introduce
any functional difference.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 06e4dd568717..c8f1e67a8ebe 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -26,6 +26,7 @@ typedef struct request *(elevator_request_list_fn) (struct request_queue *, stru | |||
26 | typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); | 26 | typedef void (elevator_completed_req_fn) (struct request_queue *, struct request *); |
27 | typedef int (elevator_may_queue_fn) (struct request_queue *, int); | 27 | typedef int (elevator_may_queue_fn) (struct request_queue *, int); |
28 | 28 | ||
29 | typedef void (elevator_init_icq_fn) (struct io_cq *); | ||
29 | typedef void (elevator_exit_icq_fn) (struct io_cq *); | 30 | typedef void (elevator_exit_icq_fn) (struct io_cq *); |
30 | typedef int (elevator_set_req_fn) (struct request_queue *, struct request *, gfp_t); | 31 | typedef int (elevator_set_req_fn) (struct request_queue *, struct request *, gfp_t); |
31 | typedef void (elevator_put_req_fn) (struct request *); | 32 | typedef void (elevator_put_req_fn) (struct request *); |
@@ -59,6 +60,7 @@ struct elevator_ops | |||
59 | elevator_request_list_fn *elevator_former_req_fn; | 60 | elevator_request_list_fn *elevator_former_req_fn; |
60 | elevator_request_list_fn *elevator_latter_req_fn; | 61 | elevator_request_list_fn *elevator_latter_req_fn; |
61 | 62 | ||
63 | elevator_init_icq_fn *elevator_init_icq_fn; | ||
62 | elevator_exit_icq_fn *elevator_exit_icq_fn; | 64 | elevator_exit_icq_fn *elevator_exit_icq_fn; |
63 | 65 | ||
64 | elevator_set_req_fn *elevator_set_req_fn; | 66 | elevator_set_req_fn *elevator_set_req_fn; |