Commit b01be554 authored by Baokun Li's avatar Baokun Li
Browse files

ext4: show the default enabled prefetch_block_bitmaps option

mainline inclusion
from mainline-v6.13-rc1
commit fdfa648ab9393de8c1be21cad17c17bdced3a68a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IB8IC8

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fdfa648ab9393de8c1be21cad17c17bdced3a68a



--------------------------------

After commit 21175ca4 ("ext4: make prefetch_block_bitmaps default"),
we enable 'prefetch_block_bitmaps' by default, but this is not shown in
the '/proc/fs/ext4/sdx/options' procfs interface.

This makes it impossible to distinguish whether the feature is enabled by
default or not, so 'prefetch_block_bitmaps' is shown in the 'options'
procfs interface when prefetch_block_bitmaps is enabled by default.

This makes it easy to notice changes to the default mount options between
versions through the '/proc/fs/ext4/sdx/options' procfs interface.

Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20241008120134.3758097-1-libaokun@huaweicloud.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
parent 40d8143f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3155,6 +3155,9 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
		SEQ_OPTS_PUTS("mb_optimize_scan=1");
	}

	if (nodefs && !test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS))
		SEQ_OPTS_PUTS("prefetch_block_bitmaps");

	ext4_show_quota_options(seq, sb);
	return 0;
}