* [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* Re: [f2fs-dev] [PATCH] f2fs: propagate resizable_tail_secno mount option
2026-08-25 8:37 [PATCH] f2fs: propagate resizable_tail_secno mount option Wenjie Qi
@ 2026-08-25 15:48 ` Daeho Jeong
2026-08-26 2:05 ` Chao Yu
2026-08-26 2:24 ` Wenjie Qi
0 siblings, 2 replies; 5+ messages in thread
From: Daeho Jeong @ 2026-08-25 15:48 UTC (permalink / raw)
To: Wenjie Qi
Cc: jaegeuk, chao, daehojeong, linux-kernel, linux-f2fs-devel,
qiwenjie
On Tue, Aug 25, 2026 at 1:42 AM Wenjie Qi <qwjhust@gmail.com> wrote:
>
> 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;
Hi Wenjie,
The original patch is still under review. If you found an issue or
have feedback, please reply with a review comment on the original
patch thread instead.
Also, if this patch was auto-generated by AI, please adjust your
system accordingly.
Thanks,
>
> f2fs_apply_compression(fc, sb);
> f2fs_apply_test_dummy_encryption(fc, sb);
>
> base-commit: d8745ba260abbcaf75fd458881381019ab3c5c07
> --
> 2.43.0
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [f2fs-dev] [PATCH] f2fs: propagate resizable_tail_secno mount option
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
1 sibling, 1 reply; 5+ messages in thread
From: Chao Yu @ 2026-08-26 2:05 UTC (permalink / raw)
To: Daeho Jeong, Wenjie Qi
Cc: chao, jaegeuk, daehojeong, linux-kernel, linux-f2fs-devel,
qiwenjie
On 8/25/26 23:48, Daeho Jeong wrote:
> On Tue, Aug 25, 2026 at 1:42 AM Wenjie Qi <qwjhust@gmail.com> wrote:
>>
>> 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;
>
> Hi Wenjie,
>
> The original patch is still under review. If you found an issue or
> have feedback, please reply with a review comment on the original
> patch thread instead.
>
> Also, if this patch was auto-generated by AI, please adjust your
> system accordingly.
Hi Wenjie,
I agree w/ Daeho, please adjust policy to give comment on pending patch
rather than just patching w/ a new one.
Thanks,
>
> Thanks,
>
>>
>> f2fs_apply_compression(fc, sb);
>> f2fs_apply_test_dummy_encryption(fc, sb);
>>
>> base-commit: d8745ba260abbcaf75fd458881381019ab3c5c07
>> --
>> 2.43.0
>>
>>
>> _______________________________________________
>> Linux-f2fs-devel mailing list
>> Linux-f2fs-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [f2fs-dev] [PATCH] f2fs: propagate resizable_tail_secno mount option
2026-08-26 2:05 ` Chao Yu
@ 2026-08-26 2:27 ` Wenjie Qi
0 siblings, 0 replies; 5+ messages in thread
From: Wenjie Qi @ 2026-08-26 2:27 UTC (permalink / raw)
To: Chao Yu; +Cc: linux-kernel, linux-f2fs-devel, qiwenjie
Hi Chao,
Yes. Please disregard this standalone patch.
On Wed, Aug 26, 2026 at 10:05 AM Chao Yu <chao@kernel.org> wrote:
>
> On 8/25/26 23:48, Daeho Jeong wrote:
> > On Tue, Aug 25, 2026 at 1:42 AM Wenjie Qi <qwjhust@gmail.com> wrote:
> >>
> >> 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;
> >
> > Hi Wenjie,
> >
> > The original patch is still under review. If you found an issue or
> > have feedback, please reply with a review comment on the original
> > patch thread instead.
> >
> > Also, if this patch was auto-generated by AI, please adjust your
> > system accordingly.
>
> Hi Wenjie,
>
> I agree w/ Daeho, please adjust policy to give comment on pending patch
> rather than just patching w/ a new one.
>
> Thanks,
>
> >
> > Thanks,
> >
> >>
> >> f2fs_apply_compression(fc, sb);
> >> f2fs_apply_test_dummy_encryption(fc, sb);
> >>
> >> base-commit: d8745ba260abbcaf75fd458881381019ab3c5c07
> >> --
> >> 2.43.0
> >>
> >>
> >> _______________________________________________
> >> Linux-f2fs-devel mailing list
> >> Linux-f2fs-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] f2fs: propagate resizable_tail_secno mount option
2026-08-25 15:48 ` [f2fs-dev] " Daeho Jeong
2026-08-26 2:05 ` Chao Yu
@ 2026-08-26 2:24 ` Wenjie Qi
1 sibling, 0 replies; 5+ messages in thread
From: Wenjie Qi @ 2026-08-26 2:24 UTC (permalink / raw)
To: daeho43
Cc: daehojeong, jaegeuk, linux-f2fs-devel, linux-kernel, qiwenjie,
qwjhust
Hi Daeho,
Understood. Please disregard this standalone patch.
Regards,
Wenjie
^ permalink raw reply [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