All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Daeho Jeong <daeho43@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: support resizable tail section and unify pinned allocation
Date: Thu, 27 Aug 2026 09:11:16 +0800	[thread overview]
Message-ID: <43d32505-41ff-4470-a75a-add402f14982@kernel.org> (raw)
In-Reply-To: <20260826153644.3726384-1-daeho43@gmail.com>

On 8/26/26 23:36, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> Currently, zoned block devices restrict pinned file allocations to
> conventional zones at the beginning of the storage (before
> first_seq_zone_segno), triggering range GC when conventional space is
> exhausted.
> 
> On regular block devices, when preparing for future online filesystem
> resizing (e.g. partition shrinking), pinned files must not be allocated
> in the tail area that will be truncated, as pinned files cannot be
> relocated by GC. Specifying the resizable tail area size (in sections)
> allows uniform mount configuration across devices of different storage
> capacities.
> 
> To support this, introduce a unified `pinned_area_max_secno` boundary
> abstraction in `f2fs_sb_info`:
> 1. Add `-o resizable_tail_secno=%u` mount option to specify the number
>    of sections at the tail of the filesystem reserved for resizing.
> 2. In `f2fs_fill_super()`, initialize `sbi->pinned_area_max_secno` as:
>    min(MAIN_SECS(sbi) - resizable_tail_sec, zoned_max_sec).
> 3. In `get_new_segment()`, restrict segment allocation for pinned files
>    (`pinning == true`) to `0 .. sbi->pinned_area_max_secno - 1`. If no
>    free section is available in the pinned area, return -EAGAIN.
> 4. In `f2fs_allocate_pinning_section()`, unify the range GC trigger to
>    run `f2fs_gc_range()` up to `sbi->pinned_area_max_secno` whenever
>    `sbi->pinned_area_max_secno < MAIN_SECS(sbi)` and allocation
>    returns -EAGAIN.
> 5. Expose `/sys/fs/f2fs/<dev>/pinned_area_max_secno` as a read-only
>    sysfs node.
> 
> Signed-off-by: Daeho Jeong <daehojeong@google.com>
> Signed-off-by: Sunmin Jeong <s_min.jeong@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2026-08-27  1:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-26 15:36 [f2fs-dev] [PATCH v2] f2fs: support resizable tail section and unify pinned allocation Daeho Jeong
2026-08-27  1:11 ` Chao Yu via Linux-f2fs-devel [this message]
2026-08-27  2:27 ` Wenjie Qi
2026-08-27  4:50 ` patchwork-bot+f2fs--- via Linux-f2fs-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43d32505-41ff-4470-a75a-add402f14982@kernel.org \
    --to=linux-f2fs-devel@lists.sourceforge.net \
    --cc=chao@kernel.org \
    --cc=daeho43@gmail.com \
    --cc=daehojeong@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.