blkcg: clear all request_queues on blkcg policy [un]registrations
commit923adde1be1df57cebd80c563058e503376645e8
authorTejun Heo <tj@kernel.org>
Mon, 5 Mar 2012 21:15:13 +0000 (5 13:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Mar 2012 20:27:23 +0000 (6 21:27 +0100)
tree7009edf644abdf6b91daaab3967ffa6a8b30633a
parent5efd611351d1a847c72d74fb12ff4bd187c0cb2c
blkcg: clear all request_queues on blkcg policy [un]registrations

Keep track of all request_queues which have blkcg initialized and turn
on bypass and invoke blkcg_clear_queue() on all before making changes
to blkcg policies.

This is to prepare for moving blkg management into blkcg core.  Note
that this uses more brute force than necessary.  Finer grained shoot
down will be implemented later and given that policy [un]registration
almost never happens on running systems (blk-throtl can't be built as
a module and cfq usually is the builtin default iosched), this
shouldn't be a problem for the time being.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
include/linux/blkdev.h