2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved.
7 # To test out pv#940675 crash in xfs_trans_brelse + quotas
8 # Without the fix, this will create an ASSERT failure in debug kernels
9 # and crash a non-debug kernel.
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
17 status=1 # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
26 # get standard environment, filters and checks
31 # real QA test starts here
33 # Modify as appropriate.
38 _require_xfs_quota_foreign
49 while (( count < limit )); do
51 chown $count.$count $file
58 echo "mkfs on scratch"
59 _scratch_mkfs >$seqres.full 2>&1
61 echo "mount with quotas"
62 export MOUNT_OPTIONS="-o usrquota"
65 echo "creating quota file with holes"
66 _chowning_file 1000 2000 100
68 echo "now fill in the holes"
69 _chowning_file 1000 2000 1
71 echo "look at the final file ownership for fun"
72 ls -l $SCRATCH_MNT/* \
73 | $AWK_PROG 'NF > 2 {print $3, $4, $NF}' \
74 | sed "s#$SCRATCH_MNT#SCRATCH_MNT#g"