blkcg: move blkio_group_stats to cfq-iosched.c
commit155fead9b6347ead90e0b0396cb108a6ba6126c6
authorTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 21:38:44 +0000 (1 14:38 -0700)
committerTejun Heo <tj@kernel.org>
Sun, 1 Apr 2012 21:38:44 +0000 (1 14:38 -0700)
tree7e14bb87d942561aa5f44ac8a2d09d6e546c6ccb
parent9ade5ea4ce57d3596eaee6a57cd212a483674058
blkcg: move blkio_group_stats to cfq-iosched.c

blkio_group_stats contains only fields used by cfq and has no reason
to be defined in blkcg core.

* Move blkio_group_stats to cfq-iosched.c and rename it to cfqg_stats.

* blkg_policy_data->stats is replaced with cfq_group->stats.
  blkg_prfill_[rw]stat() are updated to use offset against pd->pdata
  instead.

* All related macros / functions are renamed so that they have cfqg_
  prefix and the unnecessary @pol arguments are dropped.

* All stat functions now take cfq_group * instead of blkio_group *.

* lockdep assertion on queue lock dropped.  Elevator runs under queue
  lock by default.  There isn't much to be gained by adding lockdep
  assertions at stat function level.

* cfqg_stats_reset() implemented for blkio_reset_group_stats_fn method
  so that cfqg->stats can be reset.

Signed-off-by: Tejun Heo <tj@kernel.org>
block/blk-cgroup.c
block/blk-cgroup.h
block/cfq-iosched.c