blkcg: minor updates around blkcg_policy_data
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:15 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:17 +0000 (15:49 -0700)
commit814376483e7d85b69a70634633f1f9d01c6ee0cf
tree04d6f2749e947f348a184e75e7bf1bea9ff7d163
parenta9520cd6f2ac1fbbf206b915946534c6dddbaae2
blkcg: minor updates around blkcg_policy_data

* Rename blkcg->pd[] to blkcg->cpd[] so that cpd is consistently used
  for blkcg_policy_data.

* Make blkcg_policy->cpd_init_fn() take blkcg_policy_data instead of
  blkcg.  This makes it consistent with blkg_policy_data methods and
  to-be-added cpd alloc/free methods.

* blkcg_policy_data->blkcg and cpd_to_blkcg() added so that
  cpd_init_fn() can determine the associated blkcg from
  blkcg_policy_data.

v2: blkcg_policy_data->blkcg initializations were missing.  Added.

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>
block/blk-cgroup.c
block/cfq-iosched.c
include/linux/blk-cgroup.h