Description of problem: [Anck 5.10][aarch64][内部nightly]xfstests->ext4-2-bigalloc:generic/127用例执行失败,日志如下: [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/127.out.bad) --- tests/generic/127.out 2023-04-26 10:23:02.637749430 +0800 +++ /tmp/tone/run/xfstests/results//generic/127.out.bad 2023-04-26 14:01:56.101749430 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/127.out /tmp/tone/run/xfstests/results//generic/127.out.bad' to see the entire diff) # diff -u /tmp/tone/run/xfstests/tests/generic/127.out /tmp/tone/run/xfstests/results//generic/127.out.bad --- /tmp/tone/run/xfstests/tests/generic/127.out 2023-04-26 10:23:02.637749430 +0800 +++ /tmp/tone/run/xfstests/results//generic/127.out.bad 2023-04-26 14:01:56.101749430 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! +ltp/fsx -q -l 262144 -o 65536 -S 191110531 -N 100000 -R -W fsx_std_nommap +collapse range: 0x14000 to 0x15000 +do_collapse_range: fallocate: Invalid argument +LOG DUMP (7 total operations): +1( 1 mod 256): WRITE 0x39381 thru 0x3ffff (0x6c7f bytes) HOLE +2( 2 mod 256): SKIPPED (no operation) +3( 3 mod 256): SKIPPED (no operation) +4( 4 mod 256): COPY 0x17cf1 thru 0x203e2 (0x86f2 bytes) to 0x8c59 thru 0x1134a +5( 5 mod 256): PUNCH 0x2f78d thru 0x33379 (0x3bed bytes) +6( 6 mod 256): TRUNCATE DOWN from 0x40000 to 0x28b68 +7( 7 mod 256): COLLAPSE 0x14000 thru 0x14fff (0x1000 bytes) +Log of operations saved to "/fs/nvme0n1p1/fsx_std_nommap.fsxops"; replay with --replay-ops +Correct content saved for comparison +(maybe hexdump "/fs/nvme0n1p1/fsx_std_nommap" vs "/fs/nvme0n1p1/fsx_std_nommap.fsxgood") Version-Release number of selected component (if applicable): How reproducible: 必现 Steps to Reproduce: disk1=nvme0n1p1 disk2=nvme0n1p2 mkdir -p /fs/$disk1 /fs/$disk2 export TEST_DIR=/fs/$disk1 export TEST_DEV=/dev/$disk1 export SCRATCH_MNT=/fs/$disk2 export SCRATCH_DEV=/dev/$disk2 git clone --branch anck-4.19 https://gitee.com/anolis/xfstests.git export CFLAGS="-fcommon" make configure ./configure make && make install ./check tests/generic/075 Actual results: 用例执行失败 Expected results: 用例执行pass Additional info: # uname -r 5.10.134-631.git.df0033244.an8.aarch64 [root@nu4f13165 xfstests]# [root@nu4f13165 xfstests]# cat /etc/os-release NAME="Anolis OS" VERSION="8.8" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="8.8" PLATFORM_ID="platform:an8" PRETTY_NAME="Anolis OS 8.8" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" [root@nu4f13165 xfstests]# lscpu Architecture: aarch64 Byte Order: Little Endian CPU(s): 96 On-line CPU(s) list: 0-95 Thread(s) per core: 1 Core(s) per socket: 48 Socket(s): 2 NUMA node(s): 1 Vendor ID: HiSilicon BIOS Vendor ID: HiSilicon Model: 0 Model name: Kunpeng-920 BIOS Model name: HUAWEI Kunpeng 920 5250 Stepping: 0x1 CPU MHz: 2600.000 CPU max MHz: 2600.0000 CPU min MHz: 200.0000 BogoMIPS: 200.00 L1d cache: 64K L1i cache: 64K L2 cache: 512K L3 cache: 24576K NUMA node0 CPU(s): 0-95 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm [root@nu4f13165 xfstests]# free -h total used free shared buff/cache available Mem: 753Gi 3.4Gi 746Gi 10Mi 3.7Gi 746Gi Swap: 2.0Gi 0B 2.0Gi
anolis8-4.19-x86_64也有同样的失败: # uname -r 4.19.91-710.git.30c6cdce0a.an8.x86_64 测试日志如下: generic/127 [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/127.out.bad) --- tests/generic/127.out 2023-05-16 16:00:09.116949662 +0800 +++ /tmp/tone/run/xfstests/results//generic/127.out.bad 2023-05-16 16:27:15.554929217 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/127.out /tmp/tone/run/xfstests/results//generic/127.out.bad' to see the entire diff) Ran: generic/127 Failures: generic/127 Failed 1 of 1 tests [tone]Error: The return code of run() in run.sh is not 0 generic/127: Failed Test running: Done # diff -u /tmp/tone/run/xfstests/tests/generic/127.out /tmp/tone/run/xfstests/results//generic/127.out.bad --- /tmp/tone/run/xfstests/tests/generic/127.out 2023-05-16 16:00:09.116949662 +0800 +++ /tmp/tone/run/xfstests/results//generic/127.out.bad 2023-05-16 16:27:15.554929217 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! +ltp/fsx -q -l 262144 -o 65536 -S 191110531 -N 100000 -R -W fsx_std_nommap +collapse range: 0x14000 to 0x15000 +do_collapse_range: fallocate: Invalid argument +LOG DUMP (7 total operations): +1( 1 mod 256): WRITE 0x39381 thru 0x3ffff (0x6c7f bytes) HOLE +2( 2 mod 256): SKIPPED (no operation) +3( 3 mod 256): SKIPPED (no operation) +4( 4 mod 256): COPY 0x17cf1 thru 0x203e2 (0x86f2 bytes) to 0x8c59 thru 0x1134a +5( 5 mod 256): PUNCH 0x2f78d thru 0x33379 (0x3bed bytes) +6( 6 mod 256): TRUNCATE DOWN from 0x40000 to 0x28b68 +7( 7 mod 256): COLLAPSE 0x14000 thru 0x14fff (0x1000 bytes) +Log of operations saved to "/fs/nvme0n1p1/fsx_std_nommap.fsxops"; replay with --replay-ops +Correct content saved for comparison +(maybe hexdump "/fs/nvme0n1p1/fsx_std_nommap" vs "/fs/nvme0n1p1/fsx_std_nommap.fsxgood")
alinux2 x86 nightly版本有同样问题 # uname -r 4.19.91-1411.git.c18ed0b83a1b.al7.x86_64 generic/127 [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/127.out.bad) --- tests/generic/127.out 2023-05-17 22:30:58.444132285 +0800 +++ /tmp/tone/run/xfstests/results//generic/127.out.bad 2023-05-17 22:45:08.944142629 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/127.out /tmp/tone/run/xfstests/results//generic/127.out.bad' to see the entire diff)
alinux3-5.10.134-16_rc1.al8内核依旧有此问题: 日志如下: generic/127 93s ... [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//generic/127.out.bad) --- tests/generic/127.out 2023-10-11 18:02:42.025863891 +0800 +++ /var/tmp/tone/run/xfstests/results//generic/127.out.bad 2023-10-12 21:12:24.176480342 +0800 @@ -4,10 +4,17 @@ === FSX Light Mode, Memory Mapping === All 100000 operations completed A-OK! === FSX Standard Mode, No Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, Memory Mapping === -All 100000 operations completed A-OK! -=== FSX Standard Mode, No Memory Mapping === ... (Run 'diff -u /var/tmp/tone/run/xfstests/tests/generic/127.out /var/tmp/tone/run/xfstests/results//generic/127.out.bad' to see the entire diff)
016版本在内部跟踪
内部跟踪已有分析结论:在开启bigalloc的情况下, fallocate 操作需要 offset|len 与 cluster_size(16K) 对齐,但目前xfstests本身代码不会主动读取磁盘的cluster_zie信息并以此调整合并区间;且测试本身就会对小块做操作,ext4-2-bigalloc下满足不了条件,所以这个case不适用于在ext4-2-bigalloc文件系统中执行,适配用例,关闭该bug。