diff options
author | Tejun Heo <tj@kernel.org> | 2015-08-18 17:55:30 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-08-18 18:49:18 -0400 |
commit | 880f50e228f80626dff6327a6e281e40286f5228 (patch) | |
tree | 6cd8143cf1376e65c627138e07cd40debdc17e5d | |
parent | c165b3e3c7bb68c2ed55a5ac2623f030d01d9567 (diff) |
blkcg: mark existing cftypes as legacy
blkcg is about to grow interface for the unified hierarchy. Add
legacy to existing cftypes.
* blkcg_policy->cftypes -> blkcg_policy->legacy_cftypes
* blk-cgroup.c:blkcg_files -> blkcg_legacy_files
* cfq-iosched.c:cfq_blkcg_files -> cfq_blkcg_legacy_files
* blk-throttle.c:throtl_files -> throtl_legacy_files
Pure renames. No functional change.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r-- | block/blk-cgroup.c | 12 | ||||
-rw-r--r-- | block/blk-throttle.c | 4 | ||||
-rw-r--r-- | block/cfq-iosched.c | 4 | ||||
-rw-r--r-- | include/linux/blk-cgroup.h | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index fc197ea4c992..429726bed560 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -847,7 +847,7 @@ void blkg_conf_finish(struct blkg_conf_ctx *ctx) | |||
847 | } | 847 | } |
848 | EXPORT_SYMBOL_GPL(blkg_conf_finish); | 848 | EXPORT_SYMBOL_GPL(blkg_conf_finish); |
849 | 849 | ||
850 | struct cftype blkcg_files[] = { | 850 | struct cftype blkcg_legacy_files[] = { |
851 | { | 851 | { |
852 | .name = "reset_stats", | 852 | .name = "reset_stats", |
853 | .write_u64 = blkcg_reset_stats, | 853 | .write_u64 = blkcg_reset_stats, |
@@ -1094,7 +1094,7 @@ struct cgroup_subsys io_cgrp_subsys = { | |||
1094 | .css_offline = blkcg_css_offline, | 1094 | .css_offline = blkcg_css_offline, |
1095 | .css_free = blkcg_css_free, | 1095 | .css_free = blkcg_css_free, |
1096 | .can_attach = blkcg_can_attach, | 1096 | .can_attach = blkcg_can_attach, |
1097 | .legacy_cftypes = blkcg_files, | 1097 | .legacy_cftypes = blkcg_legacy_files, |
1098 | .legacy_name = "blkio", | 1098 | .legacy_name = "blkio", |
1099 | #ifdef CONFIG_MEMCG | 1099 | #ifdef CONFIG_MEMCG |
1100 | /* | 1100 | /* |
@@ -1266,9 +1266,9 @@ int blkcg_policy_register(struct blkcg_policy *pol) | |||
1266 | mutex_unlock(&blkcg_pol_mutex); | 1266 | mutex_unlock(&blkcg_pol_mutex); |
1267 | 1267 | ||
1268 | /* everything is in place, add intf files for the new policy */ | 1268 | /* everything is in place, add intf files for the new policy */ |
1269 | if (pol->cftypes) | 1269 | if (pol->legacy_cftypes) |
1270 | WARN_ON(cgroup_add_legacy_cftypes(&io_cgrp_subsys, | 1270 | WARN_ON(cgroup_add_legacy_cftypes(&io_cgrp_subsys, |
1271 | pol->cftypes)); | 1271 | pol->legacy_cftypes)); |
1272 | mutex_unlock(&blkcg_pol_register_mutex); | 1272 | mutex_unlock(&blkcg_pol_register_mutex); |
1273 | return 0; | 1273 | return 0; |
1274 | 1274 | ||
@@ -1305,8 +1305,8 @@ void blkcg_policy_unregister(struct blkcg_policy *pol) | |||
1305 | goto out_unlock; | 1305 | goto out_unlock; |
1306 | 1306 | ||
1307 | /* kill the intf files first */ | 1307 | /* kill the intf files first */ |
1308 | if (pol->cftypes) | 1308 | if (pol->legacy_cftypes) |
1309 | cgroup_rm_cftypes(pol->cftypes); | 1309 | cgroup_rm_cftypes(pol->legacy_cftypes); |
1310 | 1310 | ||
1311 | /* remove cpds and unregister */ | 1311 | /* remove cpds and unregister */ |
1312 | mutex_lock(&blkcg_pol_mutex); | 1312 | mutex_lock(&blkcg_pol_mutex); |
diff --git a/block/blk-throttle.c b/block/blk-throttle.c index bd3e4b2c7a9d..8b4f6b81bb72 100644 --- a/block/blk-throttle.c +++ b/block/blk-throttle.c | |||
@@ -1217,7 +1217,7 @@ static ssize_t tg_set_conf_uint(struct kernfs_open_file *of, | |||
1217 | return tg_set_conf(of, buf, nbytes, off, false); | 1217 | return tg_set_conf(of, buf, nbytes, off, false); |
1218 | } | 1218 | } |
1219 | 1219 | ||
1220 | static struct cftype throtl_files[] = { | 1220 | static struct cftype throtl_legacy_files[] = { |
1221 | { | 1221 | { |
1222 | .name = "throttle.read_bps_device", | 1222 | .name = "throttle.read_bps_device", |
1223 | .private = offsetof(struct throtl_grp, bps[READ]), | 1223 | .private = offsetof(struct throtl_grp, bps[READ]), |
@@ -1263,7 +1263,7 @@ static void throtl_shutdown_wq(struct request_queue *q) | |||
1263 | } | 1263 | } |
1264 | 1264 | ||
1265 | static struct blkcg_policy blkcg_policy_throtl = { | 1265 | static struct blkcg_policy blkcg_policy_throtl = { |
1266 | .cftypes = throtl_files, | 1266 | .legacy_cftypes = throtl_legacy_files, |
1267 | 1267 | ||
1268 | .pd_alloc_fn = throtl_pd_alloc, | 1268 | .pd_alloc_fn = throtl_pd_alloc, |
1269 | .pd_init_fn = throtl_pd_init, | 1269 | .pd_init_fn = throtl_pd_init, |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 38277e3ce286..baa8459f7064 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1944,7 +1944,7 @@ static int cfqg_print_avg_queue_size(struct seq_file *sf, void *v) | |||
1944 | } | 1944 | } |
1945 | #endif /* CONFIG_DEBUG_BLK_CGROUP */ | 1945 | #endif /* CONFIG_DEBUG_BLK_CGROUP */ |
1946 | 1946 | ||
1947 | static struct cftype cfq_blkcg_files[] = { | 1947 | static struct cftype cfq_blkcg_legacy_files[] = { |
1948 | /* on root, weight is mapped to leaf_weight */ | 1948 | /* on root, weight is mapped to leaf_weight */ |
1949 | { | 1949 | { |
1950 | .name = "weight_device", | 1950 | .name = "weight_device", |
@@ -4654,7 +4654,7 @@ static struct elevator_type iosched_cfq = { | |||
4654 | 4654 | ||
4655 | #ifdef CONFIG_CFQ_GROUP_IOSCHED | 4655 | #ifdef CONFIG_CFQ_GROUP_IOSCHED |
4656 | static struct blkcg_policy blkcg_policy_cfq = { | 4656 | static struct blkcg_policy blkcg_policy_cfq = { |
4657 | .cftypes = cfq_blkcg_files, | 4657 | .legacy_cftypes = cfq_blkcg_legacy_files, |
4658 | 4658 | ||
4659 | .cpd_alloc_fn = cfq_cpd_alloc, | 4659 | .cpd_alloc_fn = cfq_cpd_alloc, |
4660 | .cpd_init_fn = cfq_cpd_init, | 4660 | .cpd_init_fn = cfq_cpd_init, |
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h index db89acd2a864..6e016e6fee87 100644 --- a/include/linux/blk-cgroup.h +++ b/include/linux/blk-cgroup.h | |||
@@ -148,7 +148,7 @@ typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd); | |||
148 | struct blkcg_policy { | 148 | struct blkcg_policy { |
149 | int plid; | 149 | int plid; |
150 | /* cgroup files for the policy */ | 150 | /* cgroup files for the policy */ |
151 | struct cftype *cftypes; | 151 | struct cftype *legacy_cftypes; |
152 | 152 | ||
153 | /* operations */ | 153 | /* operations */ |
154 | blkcg_pol_alloc_cpd_fn *cpd_alloc_fn; | 154 | blkcg_pol_alloc_cpd_fn *cpd_alloc_fn; |