The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] f2fs: propagate resizable_tail_secno mount option
@ 2026-08-25  8:37 Wenjie Qi
  2026-08-25 15:48 ` [f2fs-dev] " Daeho Jeong
  0 siblings, 1 reply; 5+ messages in thread
From: Wenjie Qi @ 2026-08-25  8:37 UTC (permalink / raw)
  To: jaegeuk, chao
  Cc: s_min.jeong, daehojeong, linux-f2fs-devel, linux-kernel, qiwenjie,
	qwjhust

Mount parsing stores resizable_tail_secno in F2FS_CTX_INFO(ctx),
but it does not mark the option in ctx->spec_mask. As a
result, f2fs_apply_options() never copies the value into
F2FS_OPTION(sbi), so adjust_pinned_area_boundary() ignores
the requested tail reservation.

Set the missing spec_mask bit and propagate the parsed value
through f2fs_apply_options().

Fixes: d8745ba260ab ("f2fs: support resizable tail section and unify pinned allocation")
Signed-off-by: Wenjie Qi <qiwenjie@xiaomi.com>
---
QEMU validation summary:
- plain mount reported `pinned_area_max_secno=502`
- `-o resizable_tail_secno=1` reported `pinned_area_max_secno=501`
- bounded fill stayed within the reduced boundary through the first
  `FALLOC_RET=-1 ERRNO=28`

 fs/f2fs/super.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c1e315282ec..6238dfe6f4e 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -406,6 +406,7 @@ static match_table_t f2fs_checkpoint_tokens = {
 #define F2FS_SPEC_errors			(1 << 23)
 #define F2FS_SPEC_lookup_mode			(1 << 24)
 #define F2FS_SPEC_reserve_node			(1 << 25)
+#define F2FS_SPEC_resizable_tail_secno		BIT(26)
 
 struct f2fs_fs_context {
 	struct f2fs_mount_info info;
@@ -1250,6 +1251,7 @@ static int f2fs_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		break;
 	case Opt_resizable_tail_secno:
 		F2FS_CTX_INFO(ctx).resizable_tail_secno = result.uint_32;
+		ctx->spec_mask |= F2FS_SPEC_resizable_tail_secno;
 		break;
 	}
 	return 0;
@@ -1779,6 +1781,9 @@ static void f2fs_apply_options(struct fs_context *fc, struct super_block *sb)
 		F2FS_OPTION(sbi).errors = F2FS_CTX_INFO(ctx).errors;
 	if (ctx->spec_mask & F2FS_SPEC_lookup_mode)
 		F2FS_OPTION(sbi).lookup_mode = F2FS_CTX_INFO(ctx).lookup_mode;
+	if (ctx->spec_mask & F2FS_SPEC_resizable_tail_secno)
+		F2FS_OPTION(sbi).resizable_tail_secno =
+				F2FS_CTX_INFO(ctx).resizable_tail_secno;
 
 	f2fs_apply_compression(fc, sb);
 	f2fs_apply_test_dummy_encryption(fc, sb);

base-commit: d8745ba260abbcaf75fd458881381019ab3c5c07
-- 
2.43.0

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

end of thread, other threads:[~2026-08-26  2:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  8:37 [PATCH] f2fs: propagate resizable_tail_secno mount option Wenjie Qi
2026-08-25 15:48 ` [f2fs-dev] " Daeho Jeong
2026-08-26  2:05   ` Chao Yu
2026-08-26  2:27     ` Wenjie Qi
2026-08-26  2:24   ` Wenjie Qi

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