[问题描述]: xfstests测试套ext4文件格式执行ext4/059测试项FAIL [root@iZbp143ti4ccpaufkzata7Z xfstests]# ./check tests/ext4/059 FSTYP -- ext4 PLATFORM -- Linux/aarch64 iZbp143ti4ccpaufkzata7Z 6.6.25-2_rc1.an23.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Apr 11 15:02:38 CST 2024 MKFS_OPTIONS -- -F /dev/nvme1n1p2 MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:root_t:s0 /dev/nvme1n1p2 /fs/nvme1n1p2 ext4/059 [failed, exit status 1]- output mismatch (see /root/tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2024-04-19 15:32:06.727614965 +0800 +++ /root/tone/run/xfstests/results//ext4/059.out.bad 2024-05-07 11:23:25.140762402 +0800 @@ -1,2 +1,6 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/nvme1n1p2: mount(2) system call failed: Structure needs cleaning. + dmesg(1) may have more information after failed mount system call. +mount -o acl,user_xattr -o context=system_u:object_r:root_t:s0 /dev/nvme1n1p2 /fs/nvme1n1p2 failed +(see /root/tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /root/tone/run/xfstests/tests/ext4/059.out /root/tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check Ran: ext4/059 Failures: ext4/059 Failed 1 of 1 tests [root@iZbp143ti4ccpaufkzata7Z xfstests]# sdiff /root/tone/run/xfstests/tests/ext4/059.out /root/tone/run/xfstests/results//ext4/059.out.bad QA output created by 059 QA output created by 059 Reserved GDT blocks: 100 Reserved GDT blocks: 100 > mount: /fs/nvme1n1p2: mount(2) system call failed: Structure > dmesg(1) may have more information after failed mount > mount -o acl,user_xattr -o context=system_u:object_r:root_t:s > (see /root/tone/run/xfstests/results//ext4/059.full for detai [环境信息]: 机器类型:ECS [内核信息]: [root@iZbp143ti4ccpaufkzata7Z xfstests]# uname -r 6.6.25-2_rc1.an23.aarch64 [操作系统信息]: [root@iZbp143ti4ccpaufkzata7Z xfstests]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [文件系统] [root@iZbp143ti4ccpaufkzata7Z xfstests]# df -Th Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtmpfs 4.0M 0 4.0M 0% /dev tmpfs tmpfs 16G 0 16G 0% /dev/shm tmpfs tmpfs 6.1G 768K 6.1G 1% /run efivarfs efivarfs 256K 17K 240K 7% /sys/firmware/efi/efivars /dev/nvme0n1p2 xfs 40G 11G 30G 27% / tmpfs tmpfs 16G 0 16G 0% /tmp /dev/nvme0n1p1 vfat 500M 6.5M 494M 2% /boot/efi tmpfs tmpfs 3.1G 0 3.1G 0% /run/user/0 [问题发生概率]: 必现 [复现步骤]: 1、部署xfstests环境 2、部署测试环境 wipefs -a -f /dev/nvme1n1 wipefs -a -f /dev/nvme1n1 partprobe /dev/nvme1n1 parted -s /dev/nvme1n1 mklabel gpt mkpart primary 2048 190774 partprobe /dev/nvme1n1 parted -s /dev/nvme1n1 mkpart primary 190774 381548 mkfs -t ext4 -E lazy_itable_init=0,lazy_journal_init=0 -L OStest -q -F -q -F /dev/nvme1n1p2 mkdir -p /fs/nvme1n1p2 mount /dev/nvme1n1p2 /fs/nvme1n1p2 mkfs -t ext4 -E lazy_itable_init=0,lazy_journal_init=0 -L OStest -q -F -q -F /dev/nvme1n1p1 mkdir -p /fs/nvme1n1p1 mount /dev/nvme1n1p1 /fs/nvme1n1p1 export FSTYP=ext4 export TEST_DEV=/dev/nvme1n1p1 export SCRATCH_DEV=/dev/nvme1n1p2 export TEST_DIR=/fs/nvme1n1p1 export SCRATCH_MNT=/fs/nvme1n1p2 3、执行./check tests/ext4/059命令
在An23.1 6.6.25-2_rc1.1.an23.aarch64 非nvme硬盘上执行用例也有此问题 [root@localhost xfstests]# ./check tests/ext4/059 FSTYP -- ext4 PLATFORM -- Linux/aarch64 localhost 6.6.25-2_rc1.1.an23.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Apr 18 21:55:22 CST 2024 MKFS_OPTIONS -- -F /dev/vdb2 MOUNT_OPTIONS -- -o acl,user_xattr /dev/vdb2 /fs/vdb2 ext4/059 [failed, exit status 1]- output mismatch (see /home/anuser/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2024-05-09 22:30:16.758919275 -0400 +++ /home/anuser/xfstests/results//ext4/059.out.bad 2024-05-09 22:45:54.969592918 -0400 @@ -1,2 +1,6 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/vdb2: mount(2) system call failed: Structure needs cleaning. + dmesg(1) may have more information after failed mount system call. +mount -o acl,user_xattr /dev/vdb2 /fs/vdb2 failed +(see /home/anuser/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /home/anuser/xfstests/tests/ext4/059.out /home/anuser/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check Ran: ext4/059 Failures: ext4/059 Failed 1 of 1 tests [root@localhost xfstests]# sdiff /home/anuser/xfstests/tests/ext4/059.out /home/anuser/xfstests/results//ext4/059.out.bad QA output created by 059 QA output created by 059 Reserved GDT blocks: 100 Reserved GDT blocks: 100 > mount: /fs/vdb2: mount(2) system call failed: Structure needs > dmesg(1) may have more information after failed mount > mount -o acl,user_xattr /dev/vdb2 /fs/vdb2 failed > (see /home/anuser/xfstests/results//ext4/059.full for details dmesg日志信息: [86225.395364] EXT4-fs (vdb1): mounted filesystem 61bbfa17-303a-43e7-8741-d7bbf96f38ef r/w with ordered data mode. Quota mode: none. [86225.406342] run fstests ext4/059 at 2024-05-09 22:45:54 [86225.634978] EXT4-fs (vdb2): failed to initialize system zone (-117) [86225.635002] EXT4-fs (vdb2): mount failed [86225.653643] EXT4-fs (vdb1): unmounting filesystem 61bbfa17-303a-43e7-8741-d7bbf96f38ef.
68228da51c9a436872a4ef4b5a7692e29f7e5bc7 ext4: add correct group descriptors and reserved GDT blocks to system zone https://lore.kernel.org/all/tencent_D744D1450CC169AEA77FCF0A64719909ED05@qq.com/T/#u A (very!) quick look seems to show that it's related with the very fact that sbi->s_es->s_reserved_gdt_blocks are now taken into account to compute the number of blocks (which is the point of the patch, of course). Maybe the test needs to be fixed, as it messes up with the GDT reserved blocks...? 该patch引入了这个fail case。当前认为是合入这个patch后,case没有做出相应的修改,所以导致了误判。建议作为Known issue,待上游修复xfstests后更新测试。
如@Ferry Meng所述, ./ext4/059测试点不通过的原因是由commit 68228da51c9a436872a4ef4b5a7692e29f7e5bc7引入的。建议作为Known issue,待上游修复xfstests后更新测试。
用最新社区xfstest版本执行通过
用最新社区xfstest版本在6.6.25-2.2_rc1 arm环境验证通过 [root@4f7Lab15 xfstests]# ./check tests/ext4/059 FSTYP -- ext4 PLATFORM -- Linux/aarch64 4f7Lab15 6.6.25-2.2_rc1.an23.aarch64 #1 SMP PREEMPT_DYNAMIC Thu Oct 31 21:22:28 CST 2024 MKFS_OPTIONS -- -F /dev/nvme0n1p2 MOUNT_OPTIONS -- -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2 ext4/059 1s Ran: ext4/059 Passed all 1 tests [root@4f7Lab15 xfstests]# uname -r 6.6.25-2.2_rc1.an23.aarch64 [root@4f7Lab15 xfstests]# cat /etc/os-release NAME="Anolis OS" VERSION="23.1" ID="anolis" VERSION_ID="23.1" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23.1" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
记录下在anolis23.2 x86_64(内核6.6.25-2.2_rc1.an23.x86_64)环境下 xfstests/ext4/059也存在该问题 ------------------------- [root@5f9Lab15 xfstests]# ./check ext4/059 FSTYP -- ext4 PLATFORM -- Linux/x86_64 5f9Lab15 6.6.25-2.2_rc1.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 31 21:26:10 CST 2024 MKFS_OPTIONS -- -F /dev/nvme0n1p2 MOUNT_OPTIONS -- -o acl,user_xattr /dev/nvme0n1p2 /mnt/nvme0n1p2 ext4/059 [failed, exit status 1]- output mismatch (see /tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2024-11-18 13:30:04.251122536 +0800 +++ /tone/run/xfstests/results//ext4/059.out.bad 2024-11-18 13:42:22.550096610 +0800 @@ -1,2 +1,6 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /mnt/nvme0n1p2: mount(2) system call failed: Structure needs cleaning. + dmesg(1) may have more information after failed mount system call. +mount -o acl,user_xattr /dev/nvme0n1p2 /mnt/nvme0n1p2 failed +(see /tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /tone/run/xfstests/tests/ext4/059.out /tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check Ran: ext4/059 Failures: ext4/059 Failed 1 of 1 tests
非 6.6.25-002.2 新增问题,暂不修复
记录下在6.6.71-3_rc1.al8.aarch64环境下, xfstests/ext4/059也存在该问题 #./check tests/ext4/059 FSTYP -- ext4 PLATFORM -- Linux/aarch64 v43c07451 6.6.71-3_rc1.al8.aarch64 #1 SMP PREEMPT_DYNAMIC Fri Feb 21 11:47:20 CST 2025 MKFS_OPTIONS -- -F /dev/nvme0n1p2 MOUNT_OPTIONS -- -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2 ext4/059 [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2025-03-04 13:43:29.689884632 +0800 +++ /var/tmp/tone/run/xfstests/results//ext4/059.out.bad 2025-03-04 14:13:01.065248004 +0800 @@ -1,2 +1,5 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/nvme0n1p2: mount(2) system call failed: Structure needs cleaning. +mount -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2 failed +(see /var/tmp/tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /var/tmp/tone/run/xfstests/tests/ext4/059.out /var/tmp/tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check Ran: ext4/059 Failures: ext4/059 Failed 1 of 1 tests
在alinux3 6.6.71-3_rc1.al8.x86_64内核版本上也存在该问题: ext4/059 [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2025-03-03 23:23:32.944651527 +0800 +++ /var/tmp/tone/run/xfstests/results//ext4/059.out.bad 2025-03-05 17:38:36.682326733 +0800 @@ -1,2 +1,5 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/nvme0n1p2: mount(2) system call failed: Structure needs cleaning. +mount -o acl,user_xattr /dev/nvme0n1p2 /fs/nvme0n1p2 failed +(see /var/tmp/tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /var/tmp/tone/run/xfstests/tests/ext4/059.out /var/tmp/tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check
an23 ecs上 6.6.88-cbp.git.8932083f9.an23.aarch64内核 也存在该问题,日志如下: ext4/059 [failed, exit status 1]- output mismatch (see /var/tmp/tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2025-06-30 14:49:09.757130154 +0800 +++ /var/tmp/tone/run/xfstests/results//ext4/059.out.bad 2025-06-30 14:52:04.525699534 +0800 @@ -1,2 +1,6 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/vdb2: mount(2) system call failed: Structure needs cleaning. + dmesg(1) may have more information after failed mount system call. +mount -o acl,user_xattr /dev/vdb2 /fs/vdb2 failed +(see /var/tmp/tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /var/tmp/tone/run/xfstests/tests/ext4/059.out /var/tmp/tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check
6.6.88 x86环境,xfstests测试ext4/059用例存在同样的问题 # uname -r 6.6.88-cbp.git.3ccff695e.an23.x86_64 # cat /etc/anolis-release Anolis OS release 23 # ./check ext4/059 FSTYP -- ext4 PLATFORM -- Linux/x86_64 iZbp14mzaknw3bqe6ujc9zZ 6.6.88-cbp.git.3ccff695e.an23.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 3 22:30:35 CST 2025 MKFS_OPTIONS -- -F /dev/vdb2 MOUNT_OPTIONS -- -o acl,user_xattr -o context=system_u:object_r:root_t:s0 /dev/vdb2 /fs/vdb2 ext4/059 [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//ext4/059.out.bad) --- tests/ext4/059.out 2025-07-04 08:30:08.646372536 +0800 +++ /tmp/tone/run/xfstests/results//ext4/059.out.bad 2025-07-04 11:46:59.392595278 +0800 @@ -1,2 +1,6 @@ QA output created by 059 Reserved GDT blocks: 100 +mount: /fs/vdb2: mount(2) system call failed: Structure needs cleaning. + dmesg(1) may have more information after failed mount system call. +mount -o acl,user_xattr -o context=system_u:object_r:root_t:s0 /dev/vdb2 /fs/vdb2 failed +(see /tmp/tone/run/xfstests/results//ext4/059.full for details) ... (Run 'diff -u /tmp/tone/run/xfstests/tests/ext4/059.out /tmp/tone/run/xfstests/results//ext4/059.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: b55c3cd102a6 ext4: add reserved GDT blocks check Ran: ext4/059 Failures: ext4/059 Failed 1 of 1 tests