Skip to content
Snippets Groups Projects
Commit 5dd531a0 authored by Jens Axboe's avatar Jens Axboe
Browse files

block: add function call to switch the IO scheduler from a driver


Currently drivers must do an elevator_exit() + elevator_init()
to switch IO schedulers. There are a few problems with this:

- Since commit 1abec4fd,
  elevator_init() requires a zeroed out q->elevator
  pointer. The two existing in-kernel users don't do that.

- It will only work at initialization time, since using the
  above two-staged construct does not properly quisce the queue.

So add elevator_change() which takes care of this, and convert
the elv_iosched_store() sysfs interface to use this helper as well.

Reported-by: default avatarPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reported-by: default avatarKevin Vigor <kevin@vigor.nu>
Signed-off-by: default avatarJens Axboe <jaxboe@fusionio.com>
parent 220eb7fd
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment