Re: [f2fs-dev] [PATCH] f2fs: propagate resizable_tail_secno mount option

From: Daeho Jeong

Date: Tue Aug 25 2026 - 11:54:28 EST


On Tue, Aug 25, 2026 at 1:42 AM Wenjie Qi <qwjhust@xxxxxxxxx> 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@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel