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 _begin_fstest quota auto quick
14 # Import common functions.
18 # real QA test starts here
20 # Modify as appropriate.
25 _require_xfs_quota_foreign
36 while (( count < limit )); do
38 chown $count:$count $file
45 echo "mkfs on scratch"
46 _scratch_mkfs >$seqres.full 2>&1
48 echo "mount with quotas"
49 export MOUNT_OPTIONS="-o usrquota"
52 echo "creating quota file with holes"
53 _chowning_file 1000 2000 100
55 echo "now fill in the holes"
56 _chowning_file 1000 2000 1
58 echo "look at the final file ownership for fun"
59 ls -l $SCRATCH_MNT/* \
60 | $AWK_PROG 'NF > 2 {print $3, $4, $NF}' \
61 | sed "s#$SCRATCH_MNT#SCRATCH_MNT#g"