Bug 1073 - [Anck 4.19][ck26_rc1][xfs文件系统]xfstests ext4 generic/456 filesystem on /dev/vdb2 is inconsistent
Summary: [Anck 4.19][ck26_rc1][xfs文件系统]xfstests ext4 generic/456 filesystem on /dev/vd...
Status: RESOLVED FIXED
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: fs (show other bugs) fs
Version: 4.19-026.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: hongnan_Li
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-05 14:44 UTC by kangjiangbo
Modified: 2022-05-17 11:24 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kangjiangbo 2022-05-05 14:44:46 UTC
Description of problem:
xfs文件系统,xfstests下generic/456用例filesystem on /dev/vdb2 is inconsistent
x86和arm均存在该问题

失败几率:100%
测试日志:
./check tests/generic/456
FSTYP         -- ext4
PLATFORM      -- Linux/x86_64 iZ2ze6n8cezigzjqlcfjadZ 4.19.91-26_rc1.an7.x86_64 #1 SMP Mon Apr 25 17:24:24 CST 2022
MKFS_OPTIONS  -- /dev/vdb2
MOUNT_OPTIONS -- -o acl,user_xattr /dev/vdb2 /fs/vdb2

generic/456 0s ... [failed, exit status 1]- output mismatch (see /tmp/tone/run/xfstests/results//generic/456.out.bad)
    --- tests/generic/456.out   2022-04-27 21:06:24.065728272 +0800
    +++ /tmp/tone/run/xfstests/results//generic/456.out.bad     2022-05-05 14:28:34.866675527 +0800
    @@ -1,2 +1,3 @@
     QA output created by 456
    -Silence is golden
    +_check_generic_filesystem: filesystem on /dev/vdb2 is inconsistent
    +(see /tmp/tone/run/xfstests/results//generic/456.full for details)
    ...
    (Run 'diff -u /tmp/tone/run/xfstests/tests/generic/456.out /tmp/tone/run/xfstests/results//generic/456.out.bad'  to see the entire diff)
Ran: generic/456
Failures: generic/456
Failed 1 of 1 tests



Version-Release number of selected component (if applicable):
# uname -a
Linux iZ2ze6n8cezigzjqlcfjadZ 4.19.91-26_rc1.an7.x86_64 #1 SMP Mon Apr 25 17:24:24 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
# uname -a
Linux iZ2zebfu2pfe96wy4xb5lsZ 4.19.91-26_rc1.an7.aarch64 #1 SMP Mon Apr 25 17:30:58 CST 2022 aarch64 aarch64 aarch64 GNU/Linux
# 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 xfs -L OStest -q -f /dev/$disk1
mkfs -t xfs -L OStest -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 tests/generic/456

Actual results:


Expected results:


Additional info:
xfsprogs-4.5.0-22.an7.x86_64
Comment 1 kangjiangbo 2022-05-05 14:52:07 UTC
mkfs步骤写错了 
mkfs -t ext4 -q -F /dev/$disk1
mkfs -t ext4 -q -F /dev/$disk2
Comment 2 kangjiangbo 2022-05-05 17:33:00 UTC
an8上此用例pass
Comment 3 hongnan_Li alibaba_cloud_group 2022-05-07 11:52:05 UTC
https://github.com/kdave/xfstests/commit/af37fc423f8ef4cf26aa71f594a12ef5e768a30d
https://github.com/kdave/xfstests/commit/d9f75cdc8ffc0cc9b82d061bc21981c34a31de68

This is also a regression test for ext4 bug that zero range can beyond i_disksize and fixed by commit 801674f34ecf ("ext4: do not zeroout extents beyond i_disksize")

新的xfstests代码增加了对zero range can beyond i_disksize这个ext4 bug的测试,下面这个修复补丁未引入anck。
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c9fc93e7a96c01bafe8345fa95217b80cc40452c

在an8上用最新的xfstests代码该用例同样失败。旧的测试代码可pass,因为未增加对该bug的检测。
Comment 4 hongnan_Li alibaba_cloud_group 2022-05-07 15:22:15 UTC
https://gitee.com/anolis/cloud-kernel/pulls/337
Comment 5 kangjiangbo 2022-05-17 11:24:22 UTC
RC3版本 问题解决