[PATCH] elevator: abstract out the rbtree sort handling
The rbtree sort/lookup/reposition logic is mostly duplicated in cfq/deadline/as, so move it to the elevator core. The io schedulers still provide the actual rb root, as we don't want to impose any sort of specific handling on the schedulers. Introduce the helpers and rb_node in struct request to help migrate the IO schedulers. Signed-off-by: Jens Axboe <axboe@suse.de>
This commit is contained in:
parent
10fd48f237
commit
2e662b65f0
4 changed files with 130 additions and 19 deletions
|
@ -230,6 +230,7 @@ struct request {
|
|||
struct bio *biotail;
|
||||
|
||||
struct hlist_node hash; /* merge hash */
|
||||
struct rb_node rb_node; /* sort/lookup */
|
||||
|
||||
void *elevator_private;
|
||||
void *completion_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue