Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH] ext4: show the default enabled prefetch_block_bitmaps option
@ 2024-10-08 12:01 libaokun
  2024-10-08 13:05 ` Jan Kara
  2024-10-31 14:33 ` Theodore Ts'o
  0 siblings, 2 replies; 3+ messages in thread
From: libaokun @ 2024-10-08 12:01 UTC (permalink / raw)
  To: linux-ext4
  Cc: tytso, adilger.kernel, jack, linux-kernel, yi.zhang, yangerkun,
	libaokun, Baokun Li

From: Baokun Li <libaokun1@huawei.com>

After commit 21175ca434c5 ("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: Baokun Li <libaokun1@huawei.com>
---
 fs/ext4/super.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b77acba4a719..c88a47639e9c 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3030,6 +3030,9 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
 		SEQ_OPTS_PUTS("mb_optimize_scan=1");
 	}
 
+	if (!test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS))
+		SEQ_OPTS_PUTS("prefetch_block_bitmaps");
+
 	ext4_show_quota_options(seq, sb);
 	return 0;
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: show the default enabled prefetch_block_bitmaps option
  2024-10-08 12:01 [PATCH] ext4: show the default enabled prefetch_block_bitmaps option libaokun
@ 2024-10-08 13:05 ` Jan Kara
  2024-10-31 14:33 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2024-10-08 13:05 UTC (permalink / raw)
  To: libaokun
  Cc: linux-ext4, tytso, adilger.kernel, jack, linux-kernel, yi.zhang,
	yangerkun, Baokun Li

On Tue 08-10-24 20:01:34, libaokun@huaweicloud.com wrote:
> From: Baokun Li <libaokun1@huawei.com>
> 
> After commit 21175ca434c5 ("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: Baokun Li <libaokun1@huawei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/super.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index b77acba4a719..c88a47639e9c 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3030,6 +3030,9 @@ static int _ext4_show_options(struct seq_file *seq, struct super_block *sb,
>  		SEQ_OPTS_PUTS("mb_optimize_scan=1");
>  	}
>  
> +	if (!test_opt(sb, NO_PREFETCH_BLOCK_BITMAPS))
> +		SEQ_OPTS_PUTS("prefetch_block_bitmaps");
> +
>  	ext4_show_quota_options(seq, sb);
>  	return 0;
>  }
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ext4: show the default enabled prefetch_block_bitmaps option
  2024-10-08 12:01 [PATCH] ext4: show the default enabled prefetch_block_bitmaps option libaokun
  2024-10-08 13:05 ` Jan Kara
@ 2024-10-31 14:33 ` Theodore Ts'o
  1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2024-10-31 14:33 UTC (permalink / raw)
  To: linux-ext4, libaokun
  Cc: Theodore Ts'o, adilger.kernel, jack, linux-kernel, yi.zhang,
	yangerkun, Baokun Li


On Tue, 08 Oct 2024 20:01:34 +0800, libaokun@huaweicloud.com wrote:
> After commit 21175ca434c5 ("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.
> 
> [...]

Applied, thanks!

[1/1] ext4: show the default enabled prefetch_block_bitmaps option
      commit: 59daaffadc9a50ebea419fd3444a1f5c4e8db8dc

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-31 14:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 12:01 [PATCH] ext4: show the default enabled prefetch_block_bitmaps option libaokun
2024-10-08 13:05 ` Jan Kara
2024-10-31 14:33 ` Theodore Ts'o

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox