Description of problem: xfs文件系统,xfstests ext4-overlay generic/591 +splice-test: splice: Bad address x86和arm均存在该问题,非regression,RC1版本亦存在此问题 an8成功 失败几率:必现 Version-Release number of selected component (if applicable): # uname -r 4.19.91-26_rc3.an7.aarch64 # uname -r 4.19.91-26_rc3.an7.x86_64 # cat /etc/os-release NAME="Anolis OS" VERSION="7.7" ID="anolis" ID_LIKE="rhel fedora centos" VERSION_ID="7.7" PRETTY_NAME="Anolis OS 7.7" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugs.openanolis.cn/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" How reproducible: 1. 准备环境 #准备disk1 disk2测试盘,视本地环境修改 disk1=vdb1 disk2=vdb2 dmsetup remove_all wipefs -a --force /dev/$disk1 wipefs -a --force /dev/$disk2 mkfs -t ext4 -q -F /dev/$disk1 mkfs -t ext4 -q -F /dev/$disk2 export TEST_DIR=/fs/$disk1 export TEST_DEV=/dev/$disk1 export FSTYP=ext4 export SCRATCH_MNT=/fs/scratch mkdir /fs/$disk1 -p mkdir /fs/scratch -p export SCRATCH_DEV=/dev/$disk2 2. 下载xfstests测试代码 3. 编译测试源码 cd xfstests-dev export CFLAGS="-fcommon" make make install 4.执行测试用例 ./check -overlay tests/generic/591 Actual results: # ./check -overlay tests/generic/591 FSTYP -- overlay PLATFORM -- Linux/aarch64 iZ2zebfu2pfe96wy4xb5lsZ 4.19.91-26_rc3.an7.aarch64 #1 SMP Tue May 10 20:56:42 CST 2022 MKFS_OPTIONS -- /fs/vdb2 MOUNT_OPTIONS -- /fs/vdb2 /fs/vdb2/ovl-mnt generic/591 1s ... - output mismatch (see /tmp/tone/run/xfstests/results//generic/591.out.bad) --- tests/generic/591.out 2022-05-11 18:45:56.537456987 +0800 +++ /tmp/tone/run/xfstests/results//generic/591.out.bad 2022-05-13 16:29:10.093173660 +0800 @@ -1,7 +1,10 @@ QA output created by 591 +splice-test: splice: Bad address concurrent reader with O_DIRECT +read: /fs/vdb1/ovl-mnt/a: unexpected EOF concurrent reader with O_DIRECT concurrent reader without O_DIRECT concurrent reader without O_DIRECT ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/591.out /tmp/tone/run/xfstests/results//generic/591.out.bad' to see the entire diff) Ran: generic/591 Failures: generic/591 Failed 1 of 1 tests Expected results: Additional info: xfsprogs-4.5.0-22.an7 xfsprogs-4.19.0-5.0.1.an7 均失败 x86和arm均存在该问题,非regression,RC1版本亦存在此问题 an8成功
anolis7-4.19-x86内核4.19.91-27.4.an7.x86_64仍然存在此失败; 失败日志如下: generic/591 - output mismatch (see /tmp/tone/run/xfstests/results//generic/591.out.bad) --- tests/generic/591.out 2023-05-22 16:40:54.413486273 +0800 +++ /tmp/tone/run/xfstests/results//generic/591.out.bad 2023-05-22 17:12:41.913531969 +0800 @@ -1,5 +1,8 @@ QA output created by 591 concurrent reader with O_DIRECT +splice-test: splice: Bad address +read: /fs/vdb1/ovl-mnt/a: unexpected EOF concurrent reader without O_DIRECT sequential reader with O_DIRECT +splice-test: splice: Bad address ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/591.out /tmp/tone/run/xfstests/results//generic/591.out.bad' to see the entire diff)
anolis8 aarch64物理机环境 xfstests/ext4-2-overlay测试case:generic/591也存在该问题 ------------------------------------ [root@nu4f13168 xfstests]# ./check -overlay generic/591 mount: /mnt/nvme0n1p1: can't find in /etc/fstab. FSTYP -- overlay PLATFORM -- Linux/aarch64 nu4f13168 4.19.91-729.git.94e780376.an8.aarch64 #1 SMP Mon May 22 13:57:04 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. generic/591 mount: /mnt/nvme0n1p1: can't find in /etc/fstab. umount: /mnt/nvme0n1p1: not mounted. - output mismatch (see /tmp/tone/run/xfstests/results//generic/591.out.bad) --- tests/generic/591.out 2023-05-23 15:27:40.965573755 +0800 +++ /tmp/tone/run/xfstests/results//generic/591.out.bad 2023-05-23 15:49:20.465088373 +0800 @@ -1,5 +1,8 @@ QA output created by 591 concurrent reader with O_DIRECT +splice-test: splice: Bad address +read: /mnt/nvme0n1p1/ovl-mnt/a: unexpected EOF concurrent reader without O_DIRECT sequential reader with O_DIRECT +splice-test: splice: Bad address ... (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/591.out /tmp/tone/run/xfstests/results//generic/591.out.bad' to see the entire diff) Ran: generic/591 Failures: generic/591 Failed 1 of 1 tests
关于anolis8的失败情况,请新开一个bug
4.19缺少该上游patch: ovl: add splice file read write helper(1a980b8cbf0059a5308eea61522f232fd03002e2) overlayfs的splice_read/write会使用默认函数,该函数与overlayfs不兼容(返回错误值),需要单独处理。 与baseos版本无关。 准备回合补丁。
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1823
(In reply to 小龙 from comment #5) > The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/1823 mreged