]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - block/blk-cgroup.c
blkcg: implement blkcg_policy->on/offline_pd_fn() and blkcg_gq->online
authorTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:12 +0000 (08:05 -0800)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:12 +0000 (08:05 -0800)
commitf427d909648aa592c9588d0f66b5b457752a0cd1
treed6f91a6d46a1302f0cca6137851f0806364b7965
parentb276a876a014c5fa58a16f247c0933f6c42112e3
blkcg: implement blkcg_policy->on/offline_pd_fn() and blkcg_gq->online

Add two blkcg_policy methods, ->online_pd_fn() and ->offline_pd_fn(),
which are invoked as the policy_data gets activated and deactivated
while holding both blkcg and q locks.

Also, add blkcg_gq->online bool, which is set and cleared as the
blkcg_gq gets activated and deactivated.  This flag also is toggled
while holding both blkcg and q locks.

These will be used to implement hierarchical stats.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
block/blk-cgroup.c
block/blk-cgroup.h