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. Thanks, _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
