projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b24e77e
)
ext4: reflect mb_optimize_scan value in options file
author
Ojaswin Mujoo
<ojaswin@linux.ibm.com>
Mon, 4 Jul 2022 05:46:03 +0000
(11:16 +0530)
committer
Theodore Ts'o
<tytso@mit.edu>
Wed, 3 Aug 2022 03:56:17 +0000
(23:56 -0400)
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>
fs/ext4/super.c
patch
|
blob
|
history
diff --git
a/fs/ext4/super.c
b/fs/ext4/super.c
index a6d71a41a0c4deceaae5ac71977e57041229c5fa..9e84a5597f42899489c7f7a31494e118e62ef3c4 100644
(file)
--- 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;
}