diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-18 14:55:16 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-18 15:49:17 -0700 |
commit | e4a9bde9589fdc51283755cdd75d47b27ca7c6fb (patch) | |
tree | cc26b9cdba09e6571342f16182cafee5e82852b0 /include/uapi | |
parent | 814376483e7d85b69a70634633f1f9d01c6ee0cf (diff) | |
download | linux-e4a9bde9589fdc51283755cdd75d47b27ca7c6fb.tar.gz linux-e4a9bde9589fdc51283755cdd75d47b27ca7c6fb.tar.bz2 linux-e4a9bde9589fdc51283755cdd75d47b27ca7c6fb.zip |
blkcg: replace blkcg_policy->cpd_size with ->cpd_alloc/free_fn() methods
Each active policy has a cpd (blkcg_policy_data) on each blkcg. The
cpd's were allocated by blkcg core and each policy could request to
allocate extra space at the end by setting blkcg_policy->cpd_size
larger than the size of cpd.
This is a bit unusual but blkg (blkcg_gq) policy data used to be
handled this way too so it made sense to be consistent; however, blkg
policy data switched to alloc/free callbacks.
This patch makes similar changes to cpd handling.
blkcg_policy->cpd_alloc/free_fn() are added to replace ->cpd_size. As
cpd allocation is now done from policy side, it can simply allocate a
larger area which embeds cpd at the beginning.
As ->cpd_alloc_fn() may be able to perform all necessary
initializations, this patch makes ->cpd_init_fn() optional.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'include/uapi')
0 files changed, 0 insertions, 0 deletions