aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-09 18:03:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-09 18:03:33 -0400
commit14208b0ec56919f5333dd654b1a7d10765d0ad05 (patch)
tree474b46c351efced45925d15dc2e0049c49784716 /block/cfq-iosched.c
parent6ea4fa70e4af0da8b133b246458fb789d8cb3985 (diff)
parentc731ae1d0f02a300697a8b1564780ad28a6c2013 (diff)
Merge branch 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup updates from Tejun Heo: "A lot of activities on cgroup side. Heavy restructuring including locking simplification took place to improve the code base and enable implementation of the unified hierarchy, which currently exists behind a __DEVEL__ mount option. The core support is mostly complete but individual controllers need further work. To explain the design and rationales of the the unified hierarchy Documentation/cgroups/unified-hierarchy.txt is added. Another notable change is css (cgroup_subsys_state - what each controller uses to identify and interact with a cgroup) iteration update. This is part of continuing updates on css object lifetime and visibility. cgroup started with reference count draining on removal way back and is now reaching a point where csses behave and are iterated like normal refcnted objects albeit with some complexities to allow distinguishing the state where they're being deleted. The css iteration update isn't taken advantage of yet but is planned to be used to simplify memcg significantly" * 'for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (77 commits) cgroup: disallow disabled controllers on the default hierarchy cgroup: don't destroy the default root cgroup: disallow debug controller on the default hierarchy cgroup: clean up MAINTAINERS entries cgroup: implement css_tryget() device_cgroup: use css_has_online_children() instead of has_children() cgroup: convert cgroup_has_live_children() into css_has_online_children() cgroup: use CSS_ONLINE instead of CGRP_DEAD cgroup: iterate cgroup_subsys_states directly cgroup: introduce CSS_RELEASED and reduce css iteration fallback window cgroup: move cgroup->serial_nr into cgroup_subsys_state cgroup: link all cgroup_subsys_states in their sibling lists cgroup: move cgroup->sibling and ->children into cgroup_subsys_state cgroup: remove cgroup->parent device_cgroup: remove direct access to cgroup->children memcg: update memcg_has_children() to use css_next_child() memcg: remove tasks/children test from mem_cgroup_force_empty() cgroup: remove css_parent() cgroup: skip refcnting on normal root csses and cgrp_dfl_root self css cgroup: use cgroup->self.refcnt for cgroup refcnting ...
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 22dffebc7c73..cadc37841744 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1670,11 +1670,11 @@ static int cfq_print_leaf_weight(struct seq_file *sf, void *v)
1670 return 0; 1670 return 0;
1671} 1671}
1672 1672
1673static int __cfqg_set_weight_device(struct cgroup_subsys_state *css, 1673static ssize_t __cfqg_set_weight_device(struct kernfs_open_file *of,
1674 struct cftype *cft, const char *buf, 1674 char *buf, size_t nbytes, loff_t off,
1675 bool is_leaf_weight) 1675 bool is_leaf_weight)
1676{ 1676{
1677 struct blkcg *blkcg = css_to_blkcg(css); 1677 struct blkcg *blkcg = css_to_blkcg(of_css(of));
1678 struct blkg_conf_ctx ctx; 1678 struct blkg_conf_ctx ctx;
1679 struct cfq_group *cfqg; 1679 struct cfq_group *cfqg;
1680 int ret; 1680 int ret;
@@ -1697,19 +1697,19 @@ static int __cfqg_set_weight_device(struct cgroup_subsys_state *css,
1697 } 1697 }
1698 1698
1699 blkg_conf_finish(&ctx); 1699 blkg_conf_finish(&ctx);
1700 return ret; 1700 return ret ?: nbytes;
1701} 1701}
1702 1702
1703static int cfqg_set_weight_device(struct cgroup_subsys_state *css, 1703static ssize_t cfqg_set_weight_device(struct kernfs_open_file *of,
1704 struct cftype *cft, char *buf) 1704 char *buf, size_t nbytes, loff_t off)
1705{ 1705{
1706 return __cfqg_set_weight_device(css, cft, buf, false); 1706 return __cfqg_set_weight_device(of, buf, nbytes, off, false);
1707} 1707}
1708 1708
1709static int cfqg_set_leaf_weight_device(struct cgroup_subsys_state *css, 1709static ssize_t cfqg_set_leaf_weight_device(struct kernfs_open_file *of,
1710 struct cftype *cft, char *buf) 1710 char *buf, size_t nbytes, loff_t off)
1711{ 1711{
1712 return __cfqg_set_weight_device(css, cft, buf, true); 1712 return __cfqg_set_weight_device(of, buf, nbytes, off, true);
1713} 1713}
1714 1714
1715static int __cfq_set_weight(struct cgroup_subsys_state *css, struct cftype *cft, 1715static int __cfq_set_weight(struct cgroup_subsys_state *css, struct cftype *cft,
@@ -1837,7 +1837,7 @@ static struct cftype cfq_blkcg_files[] = {
1837 .name = "weight_device", 1837 .name = "weight_device",
1838 .flags = CFTYPE_ONLY_ON_ROOT, 1838 .flags = CFTYPE_ONLY_ON_ROOT,
1839 .seq_show = cfqg_print_leaf_weight_device, 1839 .seq_show = cfqg_print_leaf_weight_device,
1840 .write_string = cfqg_set_leaf_weight_device, 1840 .write = cfqg_set_leaf_weight_device,
1841 }, 1841 },
1842 { 1842 {
1843 .name = "weight", 1843 .name = "weight",
@@ -1851,7 +1851,7 @@ static struct cftype cfq_blkcg_files[] = {
1851 .name = "weight_device", 1851 .name = "weight_device",
1852 .flags = CFTYPE_NOT_ON_ROOT, 1852 .flags = CFTYPE_NOT_ON_ROOT,
1853 .seq_show = cfqg_print_weight_device, 1853 .seq_show = cfqg_print_weight_device,
1854 .write_string = cfqg_set_weight_device, 1854 .write = cfqg_set_weight_device,
1855 }, 1855 },
1856 { 1856 {
1857 .name = "weight", 1857 .name = "weight",
@@ -1863,7 +1863,7 @@ static struct cftype cfq_blkcg_files[] = {
1863 { 1863 {
1864 .name = "leaf_weight_device", 1864 .name = "leaf_weight_device",
1865 .seq_show = cfqg_print_leaf_weight_device, 1865 .seq_show = cfqg_print_leaf_weight_device,
1866 .write_string = cfqg_set_leaf_weight_device, 1866 .write = cfqg_set_leaf_weight_device,
1867 }, 1867 },
1868 { 1868 {
1869 .name = "leaf_weight", 1869 .name = "leaf_weight",