aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/elevator.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-07-28 03:23:08 -0400
committerJens Axboe <axboe@nelson.home.kernel.dk>2006-09-30 14:26:56 -0400
commit9817064b68fef7e4580c6df1ea597e106b9ff88b (patch)
tree76c27990626247613e9efa45b792d51ad79635d7 /include/linux/elevator.h
parent4aff5e2333c9a1609662f2091f55c3f6fffdad36 (diff)
[PATCH] elevator: move the backmerging logic into the elevator core
Right now, every IO scheduler implements its own backmerging (except for noop, which does no merging). That results in duplicated code for essentially the same operation, which is never a good thing. This patch moves the backmerging out of the io schedulers and into the elevator core. We save 1.6kb of text and as a bonus get backmerging for noop as well. Win-win! Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r--include/linux/elevator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 1713ace808bf..2c270e90b33e 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -82,12 +82,14 @@ struct elevator_queue
82 struct kobject kobj; 82 struct kobject kobj;
83 struct elevator_type *elevator_type; 83 struct elevator_type *elevator_type;
84 struct mutex sysfs_lock; 84 struct mutex sysfs_lock;
85 struct hlist_head *hash;
85}; 86};
86 87
87/* 88/*
88 * block elevator interface 89 * block elevator interface
89 */ 90 */
90extern void elv_dispatch_sort(request_queue_t *, struct request *); 91extern void elv_dispatch_sort(request_queue_t *, struct request *);
92extern void elv_dispatch_add_tail(request_queue_t *, struct request *);
91extern void elv_add_request(request_queue_t *, struct request *, int, int); 93extern void elv_add_request(request_queue_t *, struct request *, int, int);
92extern void __elv_add_request(request_queue_t *, struct request *, int, int); 94extern void __elv_add_request(request_queue_t *, struct request *, int, int);
93extern void elv_insert(request_queue_t *, struct request *, int); 95extern void elv_insert(request_queue_t *, struct request *, int);