diff options
author | Tejun Heo <tj@kernel.org> | 2015-06-16 18:48:31 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-06-17 14:47:39 -0400 |
commit | 46b15caa7cb19b0f6e3bc8ebaee5bc1bb2e35110 (patch) | |
tree | 88f100ba187aa71921ef99862129dd78de329241 /fs/ext2/super.c | |
parent | dd73e4b7df9589fa603fc6d128b4f6cabb250e8e (diff) |
vfs, writeback: replace FS_CGROUP_WRITEBACK with SB_I_CGROUPWB
FS_CGROUP_WRITEBACK indicates whether a file_system_type supports
cgroup writeback; however, different super_blocks of the same
file_system_type may or may not support cgroup writeback depending on
filesystem options. This patch replaces FS_CGROUP_WRITEBACK with a
per-super_block flag.
super_block->s_flags carries some internal flags in the high bits but
it's exposd to userland through uapi header and running out of space
anyway. This patch adds a new field super_block->s_iflags to carry
kernel-internal flags. It is currently only used by the new
SB_I_CGROUPWB flag whose concatenated and abbreviated name is for
consistency with other super_block flags.
ext2_fill_super() is updated to set SB_I_CGROUPWB.
v2: Added super_block->s_iflags instead of stealing another high bit
from sb->s_flags as suggested by Christoph and Jan.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/ext2/super.c')
-rw-r--r-- | fs/ext2/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 549219d44f1c..900e19cf9ef6 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -882,6 +882,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) | |||
882 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | | 882 | sb->s_flags = (sb->s_flags & ~MS_POSIXACL) | |
883 | ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? | 883 | ((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? |
884 | MS_POSIXACL : 0); | 884 | MS_POSIXACL : 0); |
885 | sb->s_iflags |= SB_I_CGROUPWB; | ||
885 | 886 | ||
886 | if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV && | 887 | if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV && |
887 | (EXT2_HAS_COMPAT_FEATURE(sb, ~0U) || | 888 | (EXT2_HAS_COMPAT_FEATURE(sb, ~0U) || |
@@ -1543,7 +1544,7 @@ static struct file_system_type ext2_fs_type = { | |||
1543 | .name = "ext2", | 1544 | .name = "ext2", |
1544 | .mount = ext2_mount, | 1545 | .mount = ext2_mount, |
1545 | .kill_sb = kill_block_super, | 1546 | .kill_sb = kill_block_super, |
1546 | .fs_flags = FS_REQUIRES_DEV | FS_CGROUP_WRITEBACK, | 1547 | .fs_flags = FS_REQUIRES_DEV, |
1547 | }; | 1548 | }; |
1548 | MODULE_ALIAS_FS("ext2"); | 1549 | MODULE_ALIAS_FS("ext2"); |
1549 | 1550 | ||