2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2009 Christoph Hellwig. All Rights Reserved.
7 # Test quota off handling.
9 # Based on bug reports from Utako Kusaka <u-kusaka@wm.jp.nec.com> and
10 # Ryota Yamauchi <r-yamauchi@vf.jp.nec.com>.
13 seqres=$RESULT_DIR/$seq
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
23 _scratch_unmount >/dev/null 2>&1
25 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
32 # real QA test starts here
39 echo "Silence is golden."
41 # create scratch filesystem
42 _scratch_mkfs_xfs >/dev/null 2>&1
44 # mount with quotas enabled
45 _scratch_mount -o uquota
48 xfs_quota -x -c off $SCRATCH_DEV
50 # and unmount (this used to crash)
53 # create scratch filesystem
54 _scratch_mkfs_xfs >/dev/null 2>&1
56 # mount with quotas enabled
57 _scratch_mount -o uquota
59 # turn off quota and remove space allocated to the quota files
60 # (this used to give wrong ENOSYS returns in 2.6.31)
61 xfs_quota -x -c off -c remove $SCRATCH_DEV