2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2021 Oracle. All Rights Reserved.
7 # This is a regression test for commit d0c20d38af13 "xfs: fix
8 # xfs_bmap_validate_extent_raw when checking attr fork of rt files", which
9 # fixes the bmap record validator so that it will not check the attr fork
10 # extent mappings of a realtime file against the size of the realtime volume.
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
31 # real QA test starts here
38 # Format filesystem with very tiny realtime volume
39 _scratch_mkfs -r size=256k > $seqres.full
40 _scratch_mount >> $seqres.full
42 # Create a realtime file
43 $XFS_IO_PROG -f -R -c 'pwrite 0 64k' -c stat $SCRATCH_MNT/v >> $seqres.full
45 # Add enough xattr data to force creation of xattr blocks at a higher address
46 # on the data device than the size of the realtime volume
47 for i in `seq 0 16`; do
48 $ATTR_PROG -s user.test$i $SCRATCH_MNT/v < $SCRATCH_MNT/v >> $seqres.full
51 # Force flushing extent maps to disk to trip the verifier
54 # Now let that unmount
55 echo Silence is golden.