]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
blkcg: make blkg_[rw]stat_recursive_sum() to be able to index into blkcg_gq
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:23 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:17 +0000 (15:49 -0700)
commitf12c74cab1635d67077ce8cc40da88b57980f637
tree250f9f3c6aa271f8a6899da86598666f67bce20c
parent24bdb8ef068ebdc2a57ce715f0ab22d5da32832a
blkcg: make blkg_[rw]stat_recursive_sum() to be able to index into blkcg_gq

Currently, blkg_[rw]stat_recursive_sum() assume that the target
counter is located in pd (blkg_policy_data); however, some counters
are planned to be moved to blkg (blkcg_gq).

This patch updates blkg_[rw]stat_recursive_sum() to take blkg and
blkg_policy pointers instead of pd.  If policy is NULL, it indexes
into blkg.  If non-NULL, into the blkg's pd of the policy.

The existing usages are updated to maintain the current behaviors.

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