diff options
author | Tejun Heo <htejun@gmail.com> | 2005-10-24 02:35:58 -0400 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2005-10-28 02:46:01 -0400 |
commit | cb19833dccb32f97cacbfff834b53523915f13f6 (patch) | |
tree | 24fb8d125bcfdf5209ac6f502b78160d0193428c | |
parent | 4c9f7836406f41ef9da6ee68d7a0448fdb97b5ef (diff) |
[BLOCK] kill generic max_back_kb handling
This patch kills max_back_kb handling from elv_dispatch_sort() and
kills max_back_kb field from struct request_queue.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
-rw-r--r-- | drivers/block/elevator.c | 6 | ||||
-rw-r--r-- | include/linux/blkdev.h | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/block/elevator.c b/drivers/block/elevator.c index 415144372c75..af2388e73f61 100644 --- a/drivers/block/elevator.c +++ b/drivers/block/elevator.c | |||
@@ -136,7 +136,6 @@ static int elevator_attach(request_queue_t *q, struct elevator_type *e, | |||
136 | q->elevator = eq; | 136 | q->elevator = eq; |
137 | q->end_sector = 0; | 137 | q->end_sector = 0; |
138 | q->boundary_rq = NULL; | 138 | q->boundary_rq = NULL; |
139 | q->max_back_kb = 0; | ||
140 | 139 | ||
141 | if (eq->ops->elevator_init_fn) | 140 | if (eq->ops->elevator_init_fn) |
142 | ret = eq->ops->elevator_init_fn(q, eq); | 141 | ret = eq->ops->elevator_init_fn(q, eq); |
@@ -227,16 +226,13 @@ void elevator_exit(elevator_t *e) | |||
227 | void elv_dispatch_sort(request_queue_t *q, struct request *rq) | 226 | void elv_dispatch_sort(request_queue_t *q, struct request *rq) |
228 | { | 227 | { |
229 | sector_t boundary; | 228 | sector_t boundary; |
230 | unsigned max_back; | ||
231 | struct list_head *entry; | 229 | struct list_head *entry; |
232 | 230 | ||
233 | if (q->last_merge == rq) | 231 | if (q->last_merge == rq) |
234 | q->last_merge = NULL; | 232 | q->last_merge = NULL; |
235 | 233 | ||
236 | boundary = q->end_sector; | 234 | boundary = q->end_sector; |
237 | max_back = q->max_back_kb * 2; | 235 | |
238 | boundary = boundary > max_back ? boundary - max_back : 0; | ||
239 | |||
240 | list_for_each_prev(entry, &q->queue_head) { | 236 | list_for_each_prev(entry, &q->queue_head) { |
241 | struct request *pos = list_entry_rq(entry); | 237 | struct request *pos = list_entry_rq(entry); |
242 | 238 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index bd55b1df8997..159dbcd2eb59 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -339,7 +339,6 @@ struct request_queue | |||
339 | */ | 339 | */ |
340 | sector_t end_sector; | 340 | sector_t end_sector; |
341 | struct request *boundary_rq; | 341 | struct request *boundary_rq; |
342 | unsigned int max_back_kb; | ||
343 | 342 | ||
344 | /* | 343 | /* |
345 | * Auto-unplugging state | 344 | * Auto-unplugging state |