diff options
author | Tejun Heo <tj@kernel.org> | 2013-05-14 13:52:31 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-05-14 13:52:31 -0700 |
commit | db61367038dcd222476881cb09fd54661b3cd508 (patch) | |
tree | 2c13a848bc64d34175ab7abbd0774b816a41f20e /block/blk-cgroup.h | |
parent | aa539cb38f4f1365ad52fed6a857b25f8b4dc06c (diff) | |
download | linux-stable-db61367038dcd222476881cb09fd54661b3cd508.tar.gz linux-stable-db61367038dcd222476881cb09fd54661b3cd508.tar.bz2 linux-stable-db61367038dcd222476881cb09fd54661b3cd508.zip |
blkcg: invoke blkcg_policy->pd_init() after parent is linked
Currently, when creating a new blkcg_gq, each policy's pd_init_fn() is
invoked in blkg_alloc() before the parent is linked. This makes it
difficult for policies to perform initializations which are dependent
on the parent.
This patch moves pd_init_fn() invocations to blkg_create() after the
parent blkg is linked where the new blkg is fully initialized. As
this means that blkg_free() can't assume that pd's are initialized,
pd_exit_fn() invocations are moved to __blkg_release(). This
guarantees that pd_exit_fn() is also invoked with fully initialized
blkgs with valid parent pointers.
This will help implementing hierarchy support in blk-throttle.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'block/blk-cgroup.h')
0 files changed, 0 insertions, 0 deletions