aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 17:38:45 -0400
committerTejun Heo <tj@kernel.org>2012-04-01 17:38:45 -0400
commit5bc4afb1ec6aa562fac4d9aba34d957ee42f5813 (patch)
treedfef1de2dcb71beab3150ffecf6ae564d326ffba /block/blk-cgroup.h
parentd366e7ec41882791c970dfb7c67b737be8c3a174 (diff)
blkcg: drop BLKCG_STAT_{PRIV|POL|OFF} macros
Now that all stat handling code lives in policy implementations, there's no need to encode policy ID in cft->private. * Export blkcg_prfill_[rw]stat() from blkcg, remove blkcg_print_[rw]stat(), and implement cfqg_print_[rw]stat() which use hard-code BLKIO_POLICY_PROP. * Use cft->private for offset of the target field directly and drop BLKCG_STAT_{PRIV|POL|OFF}(). Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index c930895bfac..ca0ff7c0ffb 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -34,11 +34,6 @@ enum blkio_policy_id {
34#define CFQ_WEIGHT_MAX 1000 34#define CFQ_WEIGHT_MAX 1000
35#define CFQ_WEIGHT_DEFAULT 500 35#define CFQ_WEIGHT_DEFAULT 500
36 36
37/* cft->private [un]packing for stat printing */
38#define BLKCG_STAT_PRIV(pol, off) (((unsigned)(pol) << 16) | (off))
39#define BLKCG_STAT_POL(prv) ((unsigned)(prv) >> 16)
40#define BLKCG_STAT_OFF(prv) ((unsigned)(prv) & 0xffff)
41
42enum blkg_rwstat_type { 37enum blkg_rwstat_type {
43 BLKG_RWSTAT_READ, 38 BLKG_RWSTAT_READ,
44 BLKG_RWSTAT_WRITE, 39 BLKG_RWSTAT_WRITE,
@@ -131,10 +126,8 @@ void blkcg_print_blkgs(struct seq_file *sf, struct blkio_cgroup *blkcg,
131u64 __blkg_prfill_u64(struct seq_file *sf, void *pdata, u64 v); 126u64 __blkg_prfill_u64(struct seq_file *sf, void *pdata, u64 v);
132u64 __blkg_prfill_rwstat(struct seq_file *sf, void *pdata, 127u64 __blkg_prfill_rwstat(struct seq_file *sf, void *pdata,
133 const struct blkg_rwstat *rwstat); 128 const struct blkg_rwstat *rwstat);
134int blkcg_print_stat(struct cgroup *cgrp, struct cftype *cft, 129u64 blkg_prfill_stat(struct seq_file *sf, void *pdata, int off);
135 struct seq_file *sf); 130u64 blkg_prfill_rwstat(struct seq_file *sf, void *pdata, int off);
136int blkcg_print_rwstat(struct cgroup *cgrp, struct cftype *cft,
137 struct seq_file *sf);
138 131
139struct blkg_conf_ctx { 132struct blkg_conf_ctx {
140 struct gendisk *disk; 133 struct gendisk *disk;