Skip to contentSkip to conversation

f2fs: add commit id to _fixed_by_kernel_commit for f2fs/02[1-2]

PATCH In review Chao Yu 2 participants 5 messages Oct 20, 2025 – Nov 3, 2025

lore
Share & tools
lore

Chao Yu

author
#0 lore raw

PATCH 1/2 f2fs: add commit id to _fixed_by_kernel_commit for f2fs/02[1-2]

The bugs related to f2fs/02[1-2] regression testcases have been fixed by below commits:

- 930a9a6ee8e7 ("f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()")

- c18ecd99e0c7 ("f2fs: fix to do sanity check on node footer for non inode dnode")

Let's add commit id to _fixed_by_kernel_commit in f2fs/02[1-2].

Cc Jaegeuk Kim <[email protected]>
---
 tests/f2fs/021 | 2 +-
 tests/f2fs/022 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/f2fs/021 +1 -1
index 96fc97c4..0cacb138 100755
@@ -10,7 +10,7 @@
 . ./common/preamble
 _begin_fstest auto quick mount quota remount
 
-_fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_kernel_commit 930a9a6ee8e7 \
 	"f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()"
 
 _require_scratch
tests/f2fs/022 +1 -1
index 48a8386b..f6d77c96 100755
@@ -15,7 +15,7 @@ _begin_fstest auto quick rw
 
 . ./common/attr
 
-_fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_kernel_commit c18ecd99e0c7 \
 	"f2fs: fix to do sanity check on node footer for non inode dnode"
 
 _require_scratch_nocheck
Signature · 1 line
2.49.0
author
#1 lore raw

PATCH 2/2 f2fs/022: fix to run testcase correctly

f2fs/022 will report failure as below:

f2fs/022 - output mismatch (see /share/git/fstests/results//f2fs/022.out.bad)

    --- tests/f2fs/022.out      2025-10-20 10:18:47.075968669 +0800
    +++ /share/git/fstests/results//f2fs/022.out.bad    2025-10-20 10:25:20.000000000 +0800
    @@ -1,2 +1,5 @@
     QA output created by 022
    +wrote 8388608/8388608 bytes at offset 0
    +8 MiB, 2048 ops; 0.0018 sec (4.300 GiB/sec and 1127132.6362 ops/sec)
    +fallocate: Operation not supported
     Silence is golden
    ...
    (Run 'diff -u /share/git/fstests/tests/f2fs/022.out /share/git/fstests/results//f2fs/022.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing kernel fix:
xxxxxxxxxxxx f2fs: fix to do sanity check on node footer for non inode dnode

Fix this testcase as below:

- fix a typo "$SCARTCH_MNT"
- fix to update output to "fallocate: Structure needs cleaning"
- relocate output of "$XFS_IO_PROG $foo_path -c "pwrite 0 8M"" to $seqres.full

Cc Jaegeuk Kim <[email protected]>
---
 tests/f2fs/022     | 8 +++-----
 tests/f2fs/022.out | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)
tests/f2fs/022 +3 -5
index f6d77c96..728ef4e8 100755
@@ -24,15 +24,15 @@ _require_inject_f2fs_command node i_nid
 # remove all mkfs options to avoid layout change of on-disk inode
 export MKFS_OPTIONS=""
 
-foo_path=$SCARTCH_MNT/foo
-bar_path=$SCARTCH_MNT/bar
+foo_path=$SCRATCH_MNT/foo
+bar_path=$SCRATCH_MNT/bar
 
 _scratch_mkfs >> $seqres.full
 _scratch_mount
 
 touch $foo_path
 touch $bar_path
-$XFS_IO_PROG $foo_path -c "pwrite 0 8M"
+$XFS_IO_PROG $foo_path -c "pwrite 0 8M" >> $seqres.full
 sync
 foo_ino=`stat -c '%i' $foo_path`
 bar_ino=`stat -c '%i' $bar_path`
@@ -48,7 +48,5 @@ _scratch_mount
 $XFS_IO_PROG $foo_path -c "fpunch 6984k 4k"
 _scratch_unmount
 
-echo "Silence is golden"
-
 status=0
 exit
tests/f2fs/022.out +1 -1
index 394c6a7c..5307e3d7 100644
@@ -1,2 +1,2 @@
 QA output created by 022
-Silence is golden
+fallocate: Structure needs cleaning
Signature · 1 line
2.49.0
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] f2fs/022: fix to run testcase correctly

Quoted 36 lines · Chao Yu

f2fs/022 will report failure as below:

f2fs/022 - output mismatch (see /share/git/fstests/results//f2fs/022.out.bad)

    --- tests/f2fs/022.out      2025-10-20 10:18:47.075968669 +0800
    +++ /share/git/fstests/results//f2fs/022.out.bad    2025-10-20 10:25:20.000000000 +0800
    @@ -1,2 +1,5 @@
     QA output created by 022
    +wrote 8388608/8388608 bytes at offset 0
    +8 MiB, 2048 ops; 0.0018 sec (4.300 GiB/sec and 1127132.6362 ops/sec)
    +fallocate: Operation not supported
     Silence is golden
    ...
    (Run 'diff -u /share/git/fstests/tests/f2fs/022.out /share/git/fstests/results//f2fs/022.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing kernel fix:
xxxxxxxxxxxx f2fs: fix to do sanity check on node footer for non inode dnode

Fix this testcase as below:

- fix a typo "$SCARTCH_MNT"
- fix to update output to "fallocate: Structure needs cleaning"
- relocate output of "$XFS_IO_PROG $foo_path -c "pwrite 0 8M"" to $seqres.full

Cc Jaegeuk Kim <[email protected]>
---
 tests/f2fs/022     | 8 +++-----
 tests/f2fs/022.out | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)
tests/f2fs/022 +0 -0
index f6d77c96..728ef4e8 100755

tests/f2fs/022 _require_inject_f2fs_command node i_nid · line 28

Quoted 7 lines
tests/f2fs/022 +2 -2
@@ -24,15 +24,15 @@ _require_inject_f2fs_command node i_nid
 # remove all mkfs options to avoid layout change of on-disk inode
 export MKFS_OPTIONS=""
 
-foo_path=$SCARTCH_MNT/foo
-bar_path=$SCARTCH_MNT/bar
+foo_path=$SCRATCH_MNT/foo
+bar_path=$SCRATCH_MNT/bar

Hahaha, I took long time to find out what these 2 lines try to change:) Thanks for fixing this.

Quoted 30 lines
tests/f2fs/022 +1 -3
 _scratch_mkfs >> $seqres.full
 _scratch_mount
 
 touch $foo_path
 touch $bar_path
-$XFS_IO_PROG $foo_path -c "pwrite 0 8M"
+$XFS_IO_PROG $foo_path -c "pwrite 0 8M" >> $seqres.full
 sync
 foo_ino=`stat -c '%i' $foo_path`
 bar_ino=`stat -c '%i' $bar_path`
@@ -48,7 +48,5 @@ _scratch_mount
 $XFS_IO_PROG $foo_path -c "fpunch 6984k 4k"
 _scratch_unmount
 
-echo "Silence is golden"
-
 status=0
 exit
tests/f2fs/022.out +1 -1
index 394c6a7c..5307e3d7 100644
@@ -1,2 +1,2 @@
 QA output created by 022
-Silence is golden
+fallocate: Structure needs cleaning
Signature · 1 line
2.49.0
author
#3 lore raw

Re: [PATCH 2/2] f2fs/022: fix to run testcase correctly

Quoted 40 lines · Zorro Lang
Quoted 39 lines · Chao Yu

f2fs/022 will report failure as below:

f2fs/022 - output mismatch (see /share/git/fstests/results//f2fs/022.out.bad)

    --- tests/f2fs/022.out      2025-10-20 10:18:47.075968669 +0800
    +++ /share/git/fstests/results//f2fs/022.out.bad    2025-10-20 10:25:20.000000000 +0800
    @@ -1,2 +1,5 @@
     QA output created by 022
    +wrote 8388608/8388608 bytes at offset 0
    +8 MiB, 2048 ops; 0.0018 sec (4.300 GiB/sec and 1127132.6362 ops/sec)
    +fallocate: Operation not supported
     Silence is golden
    ...
    (Run 'diff -u /share/git/fstests/tests/f2fs/022.out /share/git/fstests/results//f2fs/022.out.bad'  to see the entire diff)

HINT: You _MAY_ be missing kernel fix:
xxxxxxxxxxxx f2fs: fix to do sanity check on node footer for non inode dnode

Fix this testcase as below:

- fix a typo "$SCARTCH_MNT"
- fix to update output to "fallocate: Structure needs cleaning"
- relocate output of "$XFS_IO_PROG $foo_path -c "pwrite 0 8M"" to $seqres.full

Cc Jaegeuk Kim <[email protected]>
---
 tests/f2fs/022     | 8 +++-----
 tests/f2fs/022.out | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)
tests/f2fs/022 +0 -0
index f6d77c96..728ef4e8 100755
@@ -24,15 +24,15 @@ _require_inject_f2fs_command node i_nid
 # remove all mkfs options to avoid layout change of on-disk inode
 export MKFS_OPTIONS=""
 
Quoted 7 lines

tests/f2fs/022 _require_inject_f2fs_command node i_nid · line 28

Quoted 4 lines
tests/f2fs/022 +2 -2
-foo_path=$SCARTCH_MNT/foo
-bar_path=$SCARTCH_MNT/bar
+foo_path=$SCRATCH_MNT/foo
+bar_path=$SCRATCH_MNT/bar

Hahaha, I took long time to find out what these 2 lines try to change:) Thanks for fixing this.

Haha, Seems I rebased v2 to a problematic codebase when I sync-up code from different git repo. It took me some time to find the root cause of 022 failure. :/

Anyway, thanks for the review. :)

Thanks,

Quoted 34 lines
Quoted 30 lines
tests/f2fs/022 +1 -3
 _scratch_mkfs >> $seqres.full
 _scratch_mount
 
 touch $foo_path
 touch $bar_path
-$XFS_IO_PROG $foo_path -c "pwrite 0 8M"
+$XFS_IO_PROG $foo_path -c "pwrite 0 8M" >> $seqres.full
 sync
 foo_ino=`stat -c '%i' $foo_path`
 bar_ino=`stat -c '%i' $bar_path`
@@ -48,7 +48,5 @@ _scratch_mount
 $XFS_IO_PROG $foo_path -c "fpunch 6984k 4k"
 _scratch_unmount
 
-echo "Silence is golden"
-
 status=0
 exit
tests/f2fs/022.out +1 -1
index 394c6a7c..5307e3d7 100644
@@ -1,2 +1,2 @@
 QA output created by 022
-Silence is golden
+fallocate: Structure needs cleaning
Signature · 1 line
2.49.0
Reviewed-by on v1 1/2
#4 lore raw
In reply to Chao Yu
Quoted 6 lines · Chao Yu

The bugs related to f2fs/02[1-2] regression testcases have been fixed by below commits:

- 930a9a6ee8e7 ("f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()")

Quoted 8 lines

- c18ecd99e0c7 ("f2fs: fix to do sanity check on node footer for non inode dnode")

Let's add commit id to _fixed_by_kernel_commit in f2fs/02[1-2].

Cc Jaegeuk Kim <[email protected]>

---

Good to me,

Quoted 33 lines
 tests/f2fs/021 | 2 +-
 tests/f2fs/022 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
tests/f2fs/021 +1 -1
index 96fc97c4..0cacb138 100755
@@ -10,7 +10,7 @@
 . ./common/preamble
 _begin_fstest auto quick mount quota remount
 
-_fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_kernel_commit 930a9a6ee8e7 \
 	"f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()"
 
 _require_scratch
tests/f2fs/022 +1 -1
index 48a8386b..f6d77c96 100755
@@ -15,7 +15,7 @@ _begin_fstest auto quick rw
 
 . ./common/attr
 
-_fixed_by_kernel_commit xxxxxxxxxxxx \
+_fixed_by_kernel_commit c18ecd99e0c7 \
 	"f2fs: fix to do sanity check on node footer for non inode dnode"
 
 _require_scratch_nocheck
Signature · 1 line
2.49.0