diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-18 14:55:23 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-18 15:49:17 -0700 |
commit | f12c74cab1635d67077ce8cc40da88b57980f637 (patch) | |
tree | 250f9f3c6aa271f8a6899da86598666f67bce20c /block/cfq-iosched.c | |
parent | 24bdb8ef068ebdc2a57ce715f0ab22d5da32832a (diff) | |
download | linux-f12c74cab1635d67077ce8cc40da88b57980f637.tar.gz linux-f12c74cab1635d67077ce8cc40da88b57980f637.tar.bz2 linux-f12c74cab1635d67077ce8cc40da88b57980f637.zip |
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>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 71e55c91ee98..e861cc1ebd62 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -1886,16 +1886,16 @@ static int cfqg_print_rwstat(struct seq_file *sf, void *v) static u64 cfqg_prfill_stat_recursive(struct seq_file *sf, struct blkg_policy_data *pd, int off) { - u64 sum = blkg_stat_recursive_sum(pd, off); - + u64 sum = blkg_stat_recursive_sum(pd_to_blkg(pd), + &blkcg_policy_cfq, off); return __blkg_prfill_u64(sf, pd, sum); } static u64 cfqg_prfill_rwstat_recursive(struct seq_file *sf, struct blkg_policy_data *pd, int off) { - struct blkg_rwstat sum = blkg_rwstat_recursive_sum(pd, off); - + struct blkg_rwstat sum = blkg_rwstat_recursive_sum(pd_to_blkg(pd), + &blkcg_policy_cfq, off); return __blkg_prfill_rwstat(sf, pd, &sum); } |