aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-08-18 17:55:29 -0400
committerJens Axboe <axboe@fb.com>2015-08-18 18:49:18 -0400
commitc165b3e3c7bb68c2ed55a5ac2623f030d01d9567 (patch)
treef00e66da0185811f050ada324a6c54e5a2ed536e /block/blk-cgroup.c
parent20386ce0143899ccb5bcbda714436a82d3029f33 (diff)
blkcg: rename subsystem name from blkio to io
blkio interface has become messy over time and is currently the largest. In addition to the inconsistent naming scheme, it has multiple stat files which report more or less the same thing, a number of debug stat files which expose internal details which shouldn't have been part of the public interface in the first place, recursive and non-recursive stats and leaf and non-leaf knobs. Both recursive vs. non-recursive and leaf vs. non-leaf distinctions don't make any sense on the unified hierarchy as only leaf cgroups can contain processes. cgroups is going through a major interface revision with the unified hierarchy involving significant fundamental usage changes and given that a significant portion of the interface doesn't make sense anymore, it's a good time to reorganize the interface. As the first step, this patch renames the external visible subsystem name from "blkio" to "io". This is more concise, matches the other two major subsystem names, "cpu" and "memory", and better suited as blkcg will be involved in anything writeback related too whether an actual block device is involved or not. As the subsystem legacy_name is set to "blkio", the only userland visible change outside the unified hierarchy is that blkcg is reported as "io" instead of "blkio" in the subsystem initialized message during boot. On the unified hierarchy, blkcg now appears as "io". Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Li Zefan <lizefan@huawei.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: cgroups@vger.kernel.org Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r--block/blk-cgroup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 0af3bff198ed..fc197ea4c992 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -1089,12 +1089,13 @@ static int blkcg_can_attach(struct cgroup_subsys_state *css,
1089 return ret; 1089 return ret;
1090} 1090}
1091 1091
1092struct cgroup_subsys blkio_cgrp_subsys = { 1092struct cgroup_subsys io_cgrp_subsys = {
1093 .css_alloc = blkcg_css_alloc, 1093 .css_alloc = blkcg_css_alloc,
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_files,
1098 .legacy_name = "blkio",
1098#ifdef CONFIG_MEMCG 1099#ifdef CONFIG_MEMCG
1099 /* 1100 /*
1100 * This ensures that, if available, memcg is automatically enabled 1101 * This ensures that, if available, memcg is automatically enabled
@@ -1104,7 +1105,7 @@ struct cgroup_subsys blkio_cgrp_subsys = {
1104 .depends_on = 1 << memory_cgrp_id, 1105 .depends_on = 1 << memory_cgrp_id,
1105#endif 1106#endif
1106}; 1107};
1107EXPORT_SYMBOL_GPL(blkio_cgrp_subsys); 1108EXPORT_SYMBOL_GPL(io_cgrp_subsys);
1108 1109
1109/** 1110/**
1110 * blkcg_activate_policy - activate a blkcg policy on a request_queue 1111 * blkcg_activate_policy - activate a blkcg policy on a request_queue
@@ -1266,7 +1267,7 @@ int blkcg_policy_register(struct blkcg_policy *pol)
1266 1267
1267 /* everything is in place, add intf files for the new policy */ 1268 /* everything is in place, add intf files for the new policy */
1268 if (pol->cftypes) 1269 if (pol->cftypes)
1269 WARN_ON(cgroup_add_legacy_cftypes(&blkio_cgrp_subsys, 1270 WARN_ON(cgroup_add_legacy_cftypes(&io_cgrp_subsys,
1270 pol->cftypes)); 1271 pol->cftypes));
1271 mutex_unlock(&blkcg_pol_register_mutex); 1272 mutex_unlock(&blkcg_pol_register_mutex);
1272 return 0; 1273 return 0;