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 _begin_fstest auto quota quick
15 # Override the default cleanup function.
19 _scratch_unmount >/dev/null 2>&1
22 # Import common functions.
26 # real QA test starts here
32 # Only mount with the specific quota options mentioned below
33 _qmount_option "defaults"
35 echo "Silence is golden."
37 # create scratch filesystem
38 _scratch_mkfs_xfs >/dev/null 2>&1
40 # mount with quotas enabled
41 _scratch_mount -o uquota
44 xfs_quota -x -c off $SCRATCH_DEV
46 # and unmount (this used to crash)
49 # create scratch filesystem
50 _scratch_mkfs_xfs >/dev/null 2>&1
52 # mount with quotas enabled
53 _scratch_mount -o uquota
55 # turn off quota and remove space allocated to the quota files
56 # (this used to give wrong ENOSYS returns in 2.6.31)
57 xfs_quota -x -c off -c remove $SCRATCH_DEV