Switch the test that removes the quota files to just disable
enforcement and then unmount the file system as disabling quota
accounting is about to go away.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
- echo "checking off command (type=$type)"
- $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
- -c "off -$type -v" $SCRATCH_MNT | _filter_scratch
+ _scratch_unmount
+ _qmount_option ""
+ _qmount
+ _qmount_option $1
+ _qmount
+
+ if [ $type == "p" ]; then
+ _require_prjquota $SCRATCH_DEV
+ $XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
+ -c "project -s $id" $SCRATCH_MNT > /dev/null
+ fi
+
# init quota
echo "init quota limit and timer, and dump it"
echo "create_files 1024k 15"; create_files 1024k 15
# init quota
echo "init quota limit and timer, and dump it"
echo "create_files 1024k 15"; create_files 1024k 15
echo ; test_report -N
# off and remove test
echo ; test_report -N
# off and remove test
- echo "off and remove test"
+ echo "disable and remove test"
echo ; test_limit 100m 100m 100 100
echo ; test_quota -N
echo ; test_limit 100m 100m 100 100
echo ; test_quota -N
echo ; test_remove
echo ; test_report -N
echo ; test_remove
echo ; test_report -N
- echo "quota remount"; _qmount
+ _scratch_unmount
+
+ echo "quota remount";
+ _qmount_option $1
+ _qmount
echo ; test_report -N
# restore test
echo ; test_report -N
# restore test
}
echo "----------------------- uquota,sync ---------------------------"
}
echo "----------------------- uquota,sync ---------------------------"
-_qmount_option "uquota,sync"
-_qmount
+test_xfs_quota "uquota,sync"
echo "----------------------- gquota,sync ---------------------------"
echo "----------------------- gquota,sync ---------------------------"
-_qmount_option "gquota,sync"
-_qmount
+test_xfs_quota "gquota,sync"
echo "----------------------- pquota,sync ---------------------------"
# Need to clean the group quota before test project quota, because
# V4 xfs doesn't support separate project inode. So mkfs at here.
_scratch_unmount
_scratch_mkfs_xfs >>$seqres.full 2>&1
echo "----------------------- pquota,sync ---------------------------"
# Need to clean the group quota before test project quota, because
# V4 xfs doesn't support separate project inode. So mkfs at here.
_scratch_unmount
_scratch_mkfs_xfs >>$seqres.full 2>&1
-_qmount_option "pquota,sync"
-_qmount
-_require_prjquota $SCRATCH_DEV
-$XFS_QUOTA_PROG -D $tmp.projects -P $tmp.projid -x \
- -c "project -s $id" \
- $SCRATCH_MNT > /dev/null
-test_xfs_quota
+test_xfs_quota "pquota,sync"
_scratch_unmount
# success, all done
_scratch_unmount
# success, all done
checking report command (type=u)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking report command (type=u)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking limit command (type=u, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=u)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
checking limit command (type=u, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=u)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
-checking off command (type=u)
-User quota are not enabled on SCRATCH_DEV
+checking disable command (type=u)
+User quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
checking state command (type=u)
checking state command (type=u)
+User quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
+
checking remove command (type=u)
User quota are not enabled on SCRATCH_DEV
checking remove command (type=u)
User quota are not enabled on SCRATCH_DEV
checking report command (type=g)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking report command (type=g)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking limit command (type=g, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=g)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
checking limit command (type=g, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=g)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
-checking off command (type=g)
-Group quota are not enabled on SCRATCH_DEV
+checking disable command (type=g)
+Group quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
checking state command (type=g)
checking state command (type=g)
+Group quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
checking remove command (type=g)
Group quota are not enabled on SCRATCH_DEV
checking remove command (type=g)
Group quota are not enabled on SCRATCH_DEV
checking report command (type=p)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking report command (type=p)
fsgqa 1024 512 2048 00 [3 days] 15 10 20 00 [3 days]
checking limit command (type=p, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=p)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
checking limit command (type=p, bsoft=100m, bhard=100m, isoft=100, ihard=100)
checking quota command (type=p)
SCRATCH_DEV 1024 102400 102400 00 [--------] 15 100 100 00 [--------] SCRATCH_MNT
-checking off command (type=p)
-Project quota are not enabled on SCRATCH_DEV
+checking disable command (type=p)
+Project quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
checking state command (type=p)
checking state command (type=p)
+Project quota state on SCRATCH_MNT (SCRATCH_DEV)
+ Accounting: ON
+ Enforcement: OFF
+ Inode: #[INO] (X blocks, Y extents)
+Blocks grace time: [3 days]
+Inodes grace time: [3 days]
+Realtime Blocks grace time: [7 days]
checking remove command (type=p)
Project quota are not enabled on SCRATCH_DEV
checking remove command (type=p)
Project quota are not enabled on SCRATCH_DEV