[缺陷描述]: 背景:xfstests测试代码同步合入gitee xfstests 5.10代码后,新增此用例失败; 失败日志如下: # ./check -overlay overlay/077 FSTYP -- overlay PLATFORM -- Linux/aarch64 VM20200706-16 5.10.134-14.1.al8.aarch64 #1 SMP Thu May 18 13:19:46 CST 2023 MKFS_OPTIONS -- /fs/vdb2 MOUNT_OPTIONS -- /fs/vdb2 /fs/vdb2/ovl-mnt overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-05-22 10:58:05.858005620 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-22 15:31:54.009203384 +0800 @@ -1,2 +1,4 @@ QA output created by 077 +entry m100 has inconsistent d_ino (1572970 != 2621543) +entry f100 has inconsistent d_ino (1573071 != 2621644) Silence is golden ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: 65cd913ec9d9 ovl: invalidate readdir cache on changes to dir with origin HINT: You _MAY_ be missing kernel fix: 9011c2791e63 ovl: skip stale entries in merge dir cache iteration Ran: overlay/077 Failures: overlay/077 Failed 1 of 1 tests [复现概率]: 必现 [复现环境]: 内核: # uname -r 5.10.134-14.1.al8.aarch64 # cat /etc/os-release NAME="Alibaba Cloud Linux" VERSION="3 (Soaring Falcon)" ID="alinux" ID_LIKE="rhel fedora centos anolis" VERSION_ID="3" PLATFORM_ID="platform:al8" PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)" ANSI_COLOR="0;31" HOME_URL="https://www.aliyun.com/" CPU信息: # lscpu Architecture: aarch64 Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per cluster: 4 Socket(s): 4 Cluster(s): 1 NUMA node(s): 1 Vendor ID: HiSilicon BIOS Vendor ID: Alibaba Cloud Model: 0 Model name: Kunpeng-920 BIOS Model name: virt-rhel7.6.0 Stepping: 0x1 BogoMIPS: 200.00 NUMA node0 CPU(s): 0-3 Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma dcpop asimddp asimdfhm 内存信息: # free -h total used free shared buff/cache available Mem: 15Gi 326Mi 14Gi 0.0Ki 532Mi 14Gi Swap: 0B 0B 0B [复现步骤]: 1.下载并编译测试套 git clone --branch kernel-5.10 https://code.alibaba-inc.com/AKTF/xfstests-dev.git cd xfstests export CFLAGS="-fcommon" make configure ./configure make && make install 2.初始化测试盘 dmsetup remove_all wipefs -a --force /dev/vdb1 wipefs -a --force /dev/vdb2 mkfs -t ext4 -q -F /dev/vdb1 mkfs -t ext4 -q -F /dev/vdb2 mkdir -p /fs/vdb1 mount -t ext4 /dev/vdb1 /fs/vdb1 mkdir -p /fs/vdb2 mount -t ext4 /dev/vdb2 /fs/vdb2 umount -f -l /fs/vdb1 /fs/vdb2 3.设置环境变量 export TEST_DIR=/fs/vdb1 export TEST_DEV=/dev/vdb1 export FSTYP=ext4 export SCRATCH_DEV=/dev/vdb2 export SCRATCH_MNT=/fs/vdb2 4.执行测试用例 ./check -overlay overlay/077 [预期结果]: 用例执行成功 [实际结果]: 用例执行失败
anolis7 4.19.91-27.4.an7.x86_64内核也存在同样失败;
anolis8 4.19.91-xx aarch64环境内核也存在同样失败; ------------------------------- [root@l57h15217 xfstests]# ./check -overlay overlay/077 mount: /mnt/nvme0n1p1: can't find in /etc/fstab. FSTYP -- overlay PLATFORM -- Linux/aarch64 l57h15217 4.19.91-732.git.205df27f7.an8.aarch64 #1 SMP Wed May 24 13:55:24 UTC 2023 MKFS_OPTIONS -- /mnt/nvme0n1p2 MOUNT_OPTIONS -- /mnt/nvme0n1p2 /mnt/nvme0n1p2/ovl-mnt umount: /mnt/nvme0n1p2: not mounted. mount: /mnt/nvme0n1p1: can't find in /etc/fstab. umount: /mnt/nvme0n1p1: not mounted. overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-05-25 04:28:47.189330493 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-25 09:50:23.668584219 +0800 @@ -1,2 +1,9 @@ QA output created by 077 +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +entry m100 has inconsistent d_ino (918023 != 917717) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: 65cd913ec9d9 ovl: invalidate readdir cache on changes to dir with origin HINT: You _MAY_ be missing kernel fix: 9011c2791e63 ovl: skip stale entries in merge dir cache iteration Ran: overlay/077 Failures: overlay/077 Failed 1 of 1 tests [root@l57h15217 xfstests]# diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' > ^C [root@l57h15217 xfstests]# diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad --- /tmp/tone/run/xfstests/tests/overlay/077.out 2023-05-25 04:28:47.189330493 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-25 09:50:23.668584219 +0800 @@ -1,2 +1,9 @@ QA output created by 077 +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +mount: /mnt/nvme0n1p2: can't find in /etc/fstab. +entry m100 has inconsistent d_ino (918023 != 917717) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) +entry f100 has inconsistent d_ino (918224 != 917818) Silence is golden [root@l57h15217 xfstests]# [root@l57h15217 xfstests]# uname -r 4.19.91-732.git.205df27f7.an8.aarch64 [root@l57h15217 xfstests]# cat /etc/anolis-release Anolis OS release 8.8
anolis8-5.10-aarch存在同样的问题,日志如下: overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-05-29 12:16:09.201132460 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-29 14:42:30.501132460 +0800 @@ -1,2 +1,3 @@ QA output created by 077 +entry f100 has inconsistent d_ino (13369551 != 38797516) Silence is golden ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff)
an8 5.10 x86 nightly存在同样问题 # uname -r 5.10.134-706.git.9eb9e601b.an8.x86_64 overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-05-31 09:47:53.985144967 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-31 10:35:36.771191110 +0800 @@ -1,2 +1,4 @@ QA output created by 077 +entry m100 has inconsistent d_ino (10223722 != 40894567) +entry f100 has inconsistent d_ino (10223823 != 40894668) Silence is golden ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: 65cd913ec9d9 ovl: invalidate readdir cache on changes to dir with origin HINT: You _MAY_ be missing kernel fix: 9011c2791e63 ovl: skip stale entries in merge dir cache iteration
alinux2 nightly内核有同样问题 # uname -r 4.19.91-1425.git.f083b89c83ab.al7.x86_64 overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-05-31 11:03:33.760547332 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-31 15:40:19.113250859 +0800 @@ -1,2 +1,6 @@ QA output created by 077 +entry m100 has inconsistent d_ino (2621546 != 1048679) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) +entry f100 has inconsistent d_ino (2621647 != 1048780) Silence is golden ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: 65cd913ec9d9 ovl: invalidate readdir cache on changes to dir with origin HINT: You _MAY_ be missing kernel fix: 9011c2791e63 ovl: skip stale entries in merge dir cache iteration # diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad --- /tmp/tone/run/xfstests/tests/overlay/077.out 2023-05-31 11:03:33.760547332 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-05-31 15:40:19.113250859 +0800 @@ -1,2 +1,6 @@ QA output created by 077 +entry m100 has inconsistent d_ino (2621546 != 1048679) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) +entry f100 has inconsistent d_ino (2621647 != 1048780) Silence is golden
anolis8 4.19 x86_64也有同样失败 # uname -r 4.19.91-739.git.f083b89c83.an8.x86_64 overlay/077 - output mismatch (see /tmp/tone/run/xfstests/results//overlay/077.out.bad) --- tests/overlay/077.out 2023-06-01 10:09:52.882521909 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-06-01 10:28:25.375507925 +0800 @@ -1,2 +1,6 @@ QA output created by 077 +entry m100 has inconsistent d_ino (68812906 != 89260135) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) +entry f100 has inconsistent d_ino (68813007 != 89260236) Silence is golden ... (Run 'diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad' to see the entire diff) HINT: You _MAY_ be missing kernel fix: 65cd913ec9d9 ovl: invalidate readdir cache on changes to dir with origin HINT: You _MAY_ be missing kernel fix: 9011c2791e63 ovl: skip stale entries in merge dir cache iteration Ran: overlay/077 Failures: overlay/077 Failed 1 of 1 tests [tone]Error: The return code of run() in run.sh is not 0 overlay/077: Failed Test running: Done # diff -u /tmp/tone/run/xfstests/tests/overlay/077.out /tmp/tone/run/xfstests/results//overlay/077.out.bad --- /tmp/tone/run/xfstests/tests/overlay/077.out 2023-06-01 10:09:52.882521909 +0800 +++ /tmp/tone/run/xfstests/results//overlay/077.out.bad 2023-06-01 10:28:25.375507925 +0800 @@ -1,2 +1,6 @@ QA output created by 077 +entry m100 has inconsistent d_ino (68812906 != 89260135) +missing entry f0 +Missing created file in former merge dir (see /tmp/tone/run/xfstests/results//overlay/077.full for details) +entry f100 has inconsistent d_ino (68813007 != 89260236) Silence is golden
请安排一位同学分析一下,有几个同overlay的问题,请帮忙分析一下是否是相同原因导致
合入commit 6583a7bbb75b ("ovl: skip stale entries in merge dir cache iteration")可以解决这个问题。
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1774
(In reply to 小龙 from comment #9) > The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1774 merged
最新nightly内核,已经运行成功,问题修复,故closed此缺陷;
(In reply to gaoxiang from comment #8) > 合入commit 6583a7bbb75b ("ovl: skip stale entries in merge dir cache > iteration")可以解决这个问题。 anolis8 anck-4.19 aarch64/x86_64上,目前这个问题也存在,没有被修复,能否帮忙处理下呢?
> anolis8 anck-4.19 aarch64/x86_64上,目前这个问题也存在,没有被修复,能否帮忙处理下呢? No, I don't think it's worth introducing any new patch which is not included 4.19 LTS to anck 4.19: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/log/fs/overlayfs?h=linux-4.19.y Unless some real consumer really needs that.