]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
blkcg: mark existing cftypes as legacy
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:30 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:18 +0000 (15:49 -0700)
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>
block/blk-cgroup.c
block/blk-throttle.c
block/cfq-iosched.c
include/linux/blk-cgroup.h

index fc197ea4c992d06e5b6e19b28fe64027cc3b8d49..429726bed560b8b2020dfd14f2ee76d91193ffa0 100644 (file)
@@ -847,7 +847,7 @@ void blkg_conf_finish(struct blkg_conf_ctx *ctx)
 }
 EXPORT_SYMBOL_GPL(blkg_conf_finish);
 
-struct cftype blkcg_files[] = {
+struct cftype blkcg_legacy_files[] = {
        {
                .name = "reset_stats",
                .write_u64 = blkcg_reset_stats,
@@ -1094,7 +1094,7 @@ struct cgroup_subsys io_cgrp_subsys = {
        .css_offline = blkcg_css_offline,
        .css_free = blkcg_css_free,
        .can_attach = blkcg_can_attach,
-       .legacy_cftypes = blkcg_files,
+       .legacy_cftypes = blkcg_legacy_files,
        .legacy_name = "blkio",
 #ifdef CONFIG_MEMCG
        /*
@@ -1266,9 +1266,9 @@ int blkcg_policy_register(struct blkcg_policy *pol)
        mutex_unlock(&blkcg_pol_mutex);
 
        /* everything is in place, add intf files for the new policy */
-       if (pol->cftypes)
+       if (pol->legacy_cftypes)
                WARN_ON(cgroup_add_legacy_cftypes(&io_cgrp_subsys,
-                                                 pol->cftypes));
+                                                 pol->legacy_cftypes));
        mutex_unlock(&blkcg_pol_register_mutex);
        return 0;
 
@@ -1305,8 +1305,8 @@ void blkcg_policy_unregister(struct blkcg_policy *pol)
                goto out_unlock;
 
        /* kill the intf files first */
-       if (pol->cftypes)
-               cgroup_rm_cftypes(pol->cftypes);
+       if (pol->legacy_cftypes)
+               cgroup_rm_cftypes(pol->legacy_cftypes);
 
        /* remove cpds and unregister */
        mutex_lock(&blkcg_pol_mutex);
index bd3e4b2c7a9d4aa7c1252348254528ed075fe58b..8b4f6b81bb721b473da601cce7d2e93cbc1787b8 100644 (file)
@@ -1217,7 +1217,7 @@ static ssize_t tg_set_conf_uint(struct kernfs_open_file *of,
        return tg_set_conf(of, buf, nbytes, off, false);
 }
 
-static struct cftype throtl_files[] = {
+static struct cftype throtl_legacy_files[] = {
        {
                .name = "throttle.read_bps_device",
                .private = offsetof(struct throtl_grp, bps[READ]),
@@ -1263,7 +1263,7 @@ static void throtl_shutdown_wq(struct request_queue *q)
 }
 
 static struct blkcg_policy blkcg_policy_throtl = {
-       .cftypes                = throtl_files,
+       .legacy_cftypes         = throtl_legacy_files,
 
        .pd_alloc_fn            = throtl_pd_alloc,
        .pd_init_fn             = throtl_pd_init,
index 38277e3ce28611fcb849db5e1649fa7851ca99ec..baa8459f7064670def949e737afc5146530e3419 100644 (file)
@@ -1944,7 +1944,7 @@ static int cfqg_print_avg_queue_size(struct seq_file *sf, void *v)
 }
 #endif /* CONFIG_DEBUG_BLK_CGROUP */
 
-static struct cftype cfq_blkcg_files[] = {
+static struct cftype cfq_blkcg_legacy_files[] = {
        /* on root, weight is mapped to leaf_weight */
        {
                .name = "weight_device",
@@ -4654,7 +4654,7 @@ static struct elevator_type iosched_cfq = {
 
 #ifdef CONFIG_CFQ_GROUP_IOSCHED
 static struct blkcg_policy blkcg_policy_cfq = {
-       .cftypes                = cfq_blkcg_files,
+       .legacy_cftypes         = cfq_blkcg_legacy_files,
 
        .cpd_alloc_fn           = cfq_cpd_alloc,
        .cpd_init_fn            = cfq_cpd_init,
index db89acd2a864cbd2f9e81f8d7735f3e077b61a8e..6e016e6fee872c770aa44316ab1cf13eb7d44286 100644 (file)
@@ -148,7 +148,7 @@ typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd);
 struct blkcg_policy {
        int                             plid;
        /* cgroup files for the policy */
-       struct cftype                   *cftypes;
+       struct cftype                   *legacy_cftypes;
 
        /* operations */
        blkcg_pol_alloc_cpd_fn          *cpd_alloc_fn;