mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Daeho Jeong <daeho43@gmail.com>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com
Cc: chao@kernel.org, Daeho Jeong <daehojeong@google.com>,
	stable@vger.kernel.org
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: accurately adjust free_sections during free_segment_range
Date: Tue, 25 Aug 2026 10:16:51 +0800	[thread overview]
Message-ID: <73847857-2460-48c6-9bb4-343f043c2b82@kernel.org> (raw)
In-Reply-To: <20260825015303.2082221-1-daeho43@gmail.com>

On 8/25/26 09:53, Daeho Jeong wrote:
> From: Daeho Jeong <daehojeong@google.com>
> 
> In free_segment_range(), MAIN_SECS(sbi) is temporarily reduced by `secs`
> to restrict block allocation to the safe remaining main area while valid
> blocks in the truncated range are evacuated by GC.
> 
> However, FREE_I(sbi)->free_sections tracks the total number of free
> sections across the whole filesystem. If any sections within the
> truncated range were already free upon entering free_segment_range(),
> failing to deduct them from free_sections causes the filesystem to
> overestimate available free sections in the active, reduced main area.
> This leads to inconsistent free section accounting during GC data
> migration and can trigger unexpected allocation failures or assertion
> errors when space is tight.
> 
> Fix this by calculating the number of already-free sections in the
> truncated range, deducting them from free_sections upon entering
> free_segment_range(), and restoring them on exit.
> 
> Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress")
> Cc: stable@vger.kernel.org
> 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,

      reply	other threads:[~2026-08-25  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  1:53 Daeho Jeong
2026-08-25  2:16 ` Chao Yu [this message]

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=73847857-2460-48c6-9bb4-343f043c2b82@kernel.org \
    --to=chao@kernel.org \
    --cc=daeho43@gmail.com \
    --cc=daehojeong@google.com \
    --cc=kernel-team@android.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®