2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # test to reproduce PV951636:
8 # project quotas not updated if a file is mv'd into that directory
11 _begin_fstest quota auto quick
13 # Import common functions.
17 # Override the default cleanup function.
21 _scratch_unmount 2>/dev/null
25 # real QA test starts here
30 _require_xfs_quota_foreign
31 _require_xfs_io_command "chproj"
33 # we can't run with group quotas (on v4 xfs); the mount options for group
34 # quotas will be filtered out by _qmount_option below.
36 dir=$SCRATCH_MNT/project
39 cat >$tmp.projects <<EOF
43 cat >$tmp.projid <<EOF
47 cp /dev/null $seqres.full
48 chmod a+rwx $seqres.full # arbitrary users will write here
51 _scratch_mkfs >/dev/null 2>&1
52 _scratch_enable_pquota
54 _qmount_option "prjquota"
56 _require_prjquota $SCRATCH_DEV
60 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
61 -c "repquota -inN -p" $SCRATCH_DEV | \
62 tr -s '[:space:]' | _filter_project_quota
66 $XFS_IO_PROG -r -c "chproj -R 1" -c "chattr -R +P" $dir
68 $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
69 -c "limit -p bsoft=100m bhard=100m 1" $SCRATCH_DEV
77 xfs_mkfile 1M $TEST_DIR/6