diff options
author | Tejun Heo <tj@kernel.org> | 2012-03-05 21:14:56 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-06 20:27:21 (GMT) |
commit | 5a5bafdc396b1da7570f84fb96a0f8a288970c5e (patch) | |
tree | 31ed56739ff72b8e4cb62b10b280db99bd1b6d0e /block/noop-iosched.c | |
parent | b95ada558c9e69c69ffd6950eb644ee8a3dba18f (diff) | |
download | linux-fsl-qoriq-5a5bafdc396b1da7570f84fb96a0f8a288970c5e.tar.xz |
elevator: clear auxiliary data earlier during elevator switch
Elevator switch tries hard to keep as much as context until new
elevator is ready so that it can revert to the original state if
initializing the new elevator fails for some reason. Unfortunately,
with more auxiliary contexts to manage, this makes elevator init and
exit paths too complex and fragile.
This patch makes elevator_switch() unregister the current elevator and
flush icq's before start initializing the new one. As we still keep
the old elevator itself, the only difference is that we lose icq's on
rare occassions of switching failure, which isn't critical at all.
Note that this makes explicit elevator parameter to
elevator_init_queue() and __elv_register_queue() unnecessary as they
always can use the current elevator.
This patch enables block cgroup cleanups.
-v2: blk_add_trace_msg() prints elevator name from @new_e instead of
@e->type as the local variable no longer exists. This caused
build failure on CONFIG_BLK_DEV_IO_TRACE.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/noop-iosched.c')
0 files changed, 0 insertions, 0 deletions