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
38 # Only mount with the specific quota options mentioned below
39 _qmount_option "defaults"
41 echo "Silence is golden."
43 # create scratch filesystem
44 _scratch_mkfs_xfs >/dev/null 2>&1
46 # mount with quotas enabled
47 _scratch_mount -o uquota
50 xfs_quota -x -c off $SCRATCH_DEV
52 # and unmount (this used to crash)
55 # create scratch filesystem
56 _scratch_mkfs_xfs >/dev/null 2>&1
58 # mount with quotas enabled
59 _scratch_mount -o uquota
61 # turn off quota and remove space allocated to the quota files
62 # (this used to give wrong ENOSYS returns in 2.6.31)
63 xfs_quota -x -c off -c remove $SCRATCH_DEV