diff options
author | Ojaswin Mujoo <ojaswin@linux.ibm.com> | 2022-07-04 11:16:03 +0530 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-08-02 23:56:17 -0400 |
commit | 3fa5d23e68a34dae9df2be168750dc5e03e0e40d (patch) | |
tree | 4b9ead839629752353721bb8103bd4d5ea0367aa /fs/ext4/super.c | |
parent | b24e77ef1c6d4dbf42749ad4903c97539cc9755a (diff) | |
download | linux-stable-3fa5d23e68a34dae9df2be168750dc5e03e0e40d.tar.gz linux-stable-3fa5d23e68a34dae9df2be168750dc5e03e0e40d.tar.bz2 linux-stable-3fa5d23e68a34dae9df2be168750dc5e03e0e40d.zip |
ext4: reflect mb_optimize_scan value in options file
Add support to display the mb_optimize_scan value in
/proc/fs/ext4/<dev>/options file. The option is only
displayed when the value is non default.
Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Link: https://lore.kernel.org/r/20220704054603.21462-1-ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index a6d71a41a0c4..9e84a5597f42 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -3011,6 +3011,15 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb, } else if (test_opt2(sb, DAX_INODE)) { SEQ_OPTS_PUTS("dax=inode"); } + + if (sbi->s_groups_count >= MB_DEFAULT_LINEAR_SCAN_THRESHOLD && + !test_opt2(sb, MB_OPTIMIZE_SCAN)) { + SEQ_OPTS_PUTS("mb_optimize_scan=0"); + } else if (sbi->s_groups_count < MB_DEFAULT_LINEAR_SCAN_THRESHOLD && + test_opt2(sb, MB_OPTIMIZE_SCAN)) { + SEQ_OPTS_PUTS("mb_optimize_scan=1"); + } + ext4_show_quota_options(seq, sb); return 0; } |