* [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
@ 2026-06-22 7:04 ` Jan Prusakowski via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Jan Prusakowski @ 2026-06-22 7:04 UTC (permalink / raw)
To: fstests; +Cc: zlang, jaegeuk, linux-f2fs-devel, Jan Prusakowski
On F2FS, generic/064 fails with "extents mismatched before = 1 after =
50" following multiple fcollapse (collapse range) operations.
To ensure crash consistency and checkpoint integrity, F2FS forbids
in-place SSR (Summary Standalone Replacement) overwrites on valid
checkpointed blocks. When collapse range shifts blocks, F2FS allocates
new data pages in LFS mode (out-of-place log writes). As a result,
sequential collapse range calls rewrite shifted blocks at new log
locations, intentionally leaving the file with 50 extents.
Adjust the extent verification in generic/064 to expect exactly 50
extents on F2FS, while preserving the strict 1-extent requirement for
all other filesystems. Data integrity continues to be verified via byte
comparison.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
---
tests/generic/064 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/generic/064 b/tests/generic/064
index aed13970..b77eccb4 100755
--- a/tests/generic/064
+++ b/tests/generic/064
@@ -59,7 +59,13 @@ for (( j=0; j < $(($BLOCKS/2)); j++ )); do
done
extent_after=`_count_extents $dest`
-if [ $extent_before -ne $extent_after ]; then
+
+if [ "$FSTYP" == "f2fs" ];
+then
+ if [ $extent_before -ne 1 ] || [ $extent_after -ne 50 ]; then
+ echo "extents mismatched before = $extent_before after = $extent_after"
+ fi
+elif [ $extent_before -ne $extent_after ]; then
echo "extents mismatched before = $extent_before after = $extent_after"
fi
--
2.55.0.rc0.786.g65d90a0328-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
@ 2026-06-22 7:04 ` Jan Prusakowski via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Jan Prusakowski via Linux-f2fs-devel @ 2026-06-22 7:04 UTC (permalink / raw)
To: fstests; +Cc: jaegeuk, zlang, linux-f2fs-devel
On F2FS, generic/064 fails with "extents mismatched before = 1 after =
50" following multiple fcollapse (collapse range) operations.
To ensure crash consistency and checkpoint integrity, F2FS forbids
in-place SSR (Summary Standalone Replacement) overwrites on valid
checkpointed blocks. When collapse range shifts blocks, F2FS allocates
new data pages in LFS mode (out-of-place log writes). As a result,
sequential collapse range calls rewrite shifted blocks at new log
locations, intentionally leaving the file with 50 extents.
Adjust the extent verification in generic/064 to expect exactly 50
extents on F2FS, while preserving the strict 1-extent requirement for
all other filesystems. Data integrity continues to be verified via byte
comparison.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
---
tests/generic/064 | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/generic/064 b/tests/generic/064
index aed13970..b77eccb4 100755
--- a/tests/generic/064
+++ b/tests/generic/064
@@ -59,7 +59,13 @@ for (( j=0; j < $(($BLOCKS/2)); j++ )); do
done
extent_after=`_count_extents $dest`
-if [ $extent_before -ne $extent_after ]; then
+
+if [ "$FSTYP" == "f2fs" ];
+then
+ if [ $extent_before -ne 1 ] || [ $extent_after -ne 50 ]; then
+ echo "extents mismatched before = $extent_before after = $extent_after"
+ fi
+elif [ $extent_before -ne $extent_after ]; then
echo "extents mismatched before = $extent_before after = $extent_after"
fi
--
2.55.0.rc0.786.g65d90a0328-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
2026-06-22 7:04 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
@ 2026-06-23 8:46 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2026-06-23 8:46 UTC (permalink / raw)
To: Jan Prusakowski, fstests; +Cc: chao, jaegeuk, zlang, linux-f2fs-devel
On 6/22/26 15:04, Jan Prusakowski via Linux-f2fs-devel wrote:
> On F2FS, generic/064 fails with "extents mismatched before = 1 after =
> 50" following multiple fcollapse (collapse range) operations.
>
> To ensure crash consistency and checkpoint integrity, F2FS forbids
> in-place SSR (Summary Standalone Replacement) overwrites on valid
> checkpointed blocks. When collapse range shifts blocks, F2FS allocates
> new data pages in LFS mode (out-of-place log writes). As a result,
> sequential collapse range calls rewrite shifted blocks at new log
> locations, intentionally leaving the file with 50 extents.
>
> Adjust the extent verification in generic/064 to expect exactly 50
> extents on F2FS, while preserving the strict 1-extent requirement for
> all other filesystems. Data integrity continues to be verified via byte
> comparison.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
@ 2026-06-23 8:46 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-06-23 8:46 UTC (permalink / raw)
To: Jan Prusakowski, fstests; +Cc: jaegeuk, zlang, linux-f2fs-devel
On 6/22/26 15:04, Jan Prusakowski via Linux-f2fs-devel wrote:
> On F2FS, generic/064 fails with "extents mismatched before = 1 after =
> 50" following multiple fcollapse (collapse range) operations.
>
> To ensure crash consistency and checkpoint integrity, F2FS forbids
> in-place SSR (Summary Standalone Replacement) overwrites on valid
> checkpointed blocks. When collapse range shifts blocks, F2FS allocates
> new data pages in LFS mode (out-of-place log writes). As a result,
> sequential collapse range calls rewrite shifted blocks at new log
> locations, intentionally leaving the file with 50 extents.
>
> Adjust the extent verification in generic/064 to expect exactly 50
> extents on F2FS, while preserving the strict 1-extent requirement for
> all other filesystems. Data integrity continues to be verified via byte
> comparison.
>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> Signed-off-by: Jan Prusakowski <jprusakowski@google.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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
2026-06-22 7:04 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
@ 2026-06-24 7:46 ` Christoph Hellwig
-1 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2026-06-24 7:46 UTC (permalink / raw)
To: Jan Prusakowski; +Cc: jaegeuk, zlang, fstests, linux-f2fs-devel
On Mon, Jun 22, 2026 at 07:04:38AM +0000, Jan Prusakowski wrote:
> On F2FS, generic/064 fails with "extents mismatched before = 1 after =
> 50" following multiple fcollapse (collapse range) operations.
>
> To ensure crash consistency and checkpoint integrity, F2FS forbids
> in-place SSR (Summary Standalone Replacement) overwrites on valid
> checkpointed blocks. When collapse range shifts blocks, F2FS allocates
> new data pages in LFS mode (out-of-place log writes). As a result,
> sequential collapse range calls rewrite shifted blocks at new log
> locations, intentionally leaving the file with 50 extents.
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.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] generic/064: allow 50 extents on F2FS after fcollapse
@ 2026-06-24 7:46 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2026-06-24 7:46 UTC (permalink / raw)
To: Jan Prusakowski; +Cc: fstests, zlang, jaegeuk, linux-f2fs-devel
On Mon, Jun 22, 2026 at 07:04:38AM +0000, Jan Prusakowski wrote:
> On F2FS, generic/064 fails with "extents mismatched before = 1 after =
> 50" following multiple fcollapse (collapse range) operations.
>
> To ensure crash consistency and checkpoint integrity, F2FS forbids
> in-place SSR (Summary Standalone Replacement) overwrites on valid
> checkpointed blocks. When collapse range shifts blocks, F2FS allocates
> new data pages in LFS mode (out-of-place log writes). As a result,
> sequential collapse range calls rewrite shifted blocks at new log
> locations, intentionally leaving the file with 50 extents.
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-24 7:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22 7:04 [PATCH] generic/064: allow 50 extents on F2FS after fcollapse Jan Prusakowski
2026-06-22 7:04 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
2026-06-23 8:46 ` Chao Yu
2026-06-23 8:46 ` Chao Yu via Linux-f2fs-devel
2026-06-24 7:46 ` Christoph Hellwig
2026-06-24 7:46 ` Christoph Hellwig
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.