Skip to contentSkip to conversation

generic/018: do not run the test if a compressed filesystem is used

PATCH In review Jan Prusakowski 2 participants 4 messages Jun 20, 2025 – Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

cover generic/018: do not run the test if a compressed filesystem is used

Hi,

We're testing F2FS internally and when we use a compressed file system we see the test generic/018 fail consistently. It looks like this is due to fiemap not supporting compressed extents correctly:

    [...]
    defrag /vdc/fragfile.9981 in region[0, 40960]
    /vdc/fragfile.9981:
        0: [0..31]: 2682968..2682999
        1: [32..63]: 2682976..2683007
        2: [64..79]: 2682984..2682999
    Failed to adequately defragment file

We'd like to disable the test when the file system uses compression. Please check the following patch.

Please let me know your thoughts on this.

Kind regards,
Jan

Jan Prusakowski (1):
generic/018: do not run the test if a compressed filesystem is used

 tests/generic/018 | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
#1 lore raw

PATCH 1/1 generic/018: do not run the test if a compressed filesystem is used

fiemap does not support compressed extents correctly and the defragmentation check fails.

---
 tests/generic/018 | 2 ++
 1 file changed, 2 insertions(+)
tests/generic/018 +2 -0
index 501960d7..52b48dca 100755
@@ -13,6 +13,8 @@ _begin_fstest auto fsr quick defrag
 . ./common/filter
 . ./common/defrag
 
+# Fiemap doesn't work well with compressed extents
+_require_no_compress
 
 # We require scratch so that we'll have free contiguous space
 _require_scratch
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
#2 lore raw
In reply to Jan Prusakowski
Quoted 3 lines · Jan Prusakowski

Hi,

We're testing F2FS internally and when we use a compressed file system we

I saw you used _require_no_compress in your patch, but this function only supports btrfs checking currently. How do you avoid your test failure on F2FS?

And there're many fiemap related test cases, will they all fail on compressed fs?

Thanks,
Zorro

Quoted 30 lines

see the test generic/018 fail consistently. It looks like this is due to fiemap not supporting compressed extents correctly:

    [...]
    defrag /vdc/fragfile.9981 in region[0, 40960]
    /vdc/fragfile.9981:
        0: [0..31]: 2682968..2682999
        1: [32..63]: 2682976..2683007
        2: [64..79]: 2682984..2682999
    Failed to adequately defragment file

We'd like to disable the test when the file system uses compression. Please check the following patch.

Please let me know your thoughts on this.

Kind regards,
Jan

Jan Prusakowski (1):
generic/018: do not run the test if a compressed filesystem is used

 tests/generic/018 | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.50.0.rc2.701.gf1e915cc24-goog
#3 lore raw
Quoted 3 lines · Zorro Lang

I saw you used _require_no_compress in your patch, but this function only supports btrfs checking currently. How do you avoid your test failure on F2FS?

Hi Zorro,

You're right - that patch won't work as I intended. Thanks for taking the time to review it. We've done some more checks and it looks like our initial suspicion was wrong and we'll need a kernel fix to address the problems with the test.

Thanks again!
Jan