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.
Showing the changes to include/linux/backing-dev.h (1 of 3 files). Show all
Unified · Split
| @@ -260,7 +260,7 @@ static inline bool inode_cgwb_enabled(struct inode *inode) · 259 unmodified lines | |||
| 260 | 260 | ||
| 261 | return bdi_cap_account_dirty(bdi) && | 261 | return bdi_cap_account_dirty(bdi) && |
| 262 | (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) && | 262 | (bdi->capabilities & BDI_CAP_CGROUP_WRITEBACK) && |
| 263 | (inode->i_sb->s_type->fs_flags & FS_CGROUP_WRITEBACK); | 263 | (inode->i_sb->s_iflags & SB_I_CGROUPWB); |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | /** | 266 | /** |