From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Zorro Lang <zlang@kernel.org>
Cc: fstests@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net,
Christoph Hellwig <hch@infradead.org>,
jaegeuk@kernel.org
Subject: Re: [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
Date: Wed, 22 Jul 2026 09:22:26 +0800 [thread overview]
Message-ID: <d3500e74-6e7f-4535-baba-36c63f0601c8@kernel.org> (raw)
In-Reply-To: <alyS3PRtALHIV5no@zlang-mailbox>
Hi Zorro,
On 7/19/2026 5:24 PM, Zorro Lang wrote:
> On Tue, Jun 30, 2026 at 08:09:19PM +0800, Chao Yu wrote:
>> On 6/30/26 00:37, Zorro Lang via Linux-f2fs-devel wrote:
>>> On Wed, Jun 24, 2026 at 12:46:01AM -0700, Christoph Hellwig wrote:
>>>> This sounds odd. The test allocates a contigous range and then just does
>>>> insert/collapse on it, which should not lead to any new data block
>>>> allocations. Given that the test works fine on zoned XFS and btrfs
>>>> with strict out of place write policies we know it does not require
>>>> overwriting blocks to work as well.
>>>>
>>>> So I think something is fishy in f2fs if needs to allocate data blocks
>>>> here.
>>>
>>> I have the same question with Christoph. Shouldn't fcollapse in F2FS just
>>> remap the metadata instead of allocating new data blocks?
>>
>> Hi Christoph, Zorro,
>>
>> Let me explain it briefly, this is because f2fs has only one copy of reverse
>> mapping table (aka SSA), for any checkpointed data, we can not modify SSA info
>> directly during remap, otherwise, after sudden power-cut, we will suffer
>> inconsistent issue in between reverse mapping table and mapping table. So, f2fs
>> choose to rewrite for any checkpointed data.
>
> Hi Chao,
>
> Thank you for the detailed explanation. I now see why F2FS handles this
> differently.
>
> Since this is by design for F2FS, I'd like to merge this fix to help f2fs
> avoid this test failure at first. As for the potential write amplification
> and performance overhead introduced by this rewrite strategy, that can be
> discussed further on the f2fs list if necessary.
It makes sense to me, we can discuss about the detailed implementation in f2fs
list if there is any concern.
>
> I will merge the patch with some clarifying comments:
>
> /*
> * F2FS uses a rewrite strategy for fcollapse/finsert on checkpointed data.
> * Since F2FS has only a single copy of the reverse mapping table (SSA),
> * directly remapping checkpointed metadata could cause inconsistency
> * issues after a sudden power-cut.
> */
>
> Is this ^^ good to you, or feel free to give me a proper comment to add into
> this patch.
Looks good, thanks for the help!
Thanks
>
> Thanks,
> Zorro
>
>>
>> Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2026-07-22 1:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-22 7:04 [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse Jan Prusakowski via Linux-f2fs-devel
2026-06-23 8:46 ` Chao Yu via Linux-f2fs-devel
2026-06-24 7:46 ` Christoph Hellwig
2026-06-29 16:37 ` Zorro Lang via Linux-f2fs-devel
2026-06-30 12:09 ` Chao Yu via Linux-f2fs-devel
2026-07-19 9:24 ` Zorro Lang via Linux-f2fs-devel
2026-07-22 1:22 ` Chao Yu via Linux-f2fs-devel [this message]
2026-07-20 8:04 ` Christoph Hellwig
2026-07-22 1:12 ` Chao Yu via Linux-f2fs-devel
2026-07-22 8:59 ` Christoph Hellwig
2026-07-22 12:32 ` Chao Yu 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=d3500e74-6e7f-4535-baba-36c63f0601c8@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=zlang@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