generic/506: mount scratch fs before testing for prjquota presence

On XFS, the _require_prjquota helper takes a path to a block device,
but (unintuitively) requires the block device to be mounted for the
detection to work properly.  Fix the detection code in generic/506.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
Darrick J. Wong
2019-07-24 08:55:43 -07:00
committed by Eryu Guan
parent 2405d4bc0b
commit d67b78bd9e
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ _require_xfs_quota_foreign()
}
#
# checks that the project quota support in the kernel is enabled.
# Checks that the project quota support in the kernel is enabled.
# The device must be mounted for detection to work properly.
#
_require_prjquota()
{
+2
View File
@@ -51,7 +51,9 @@ _require_scratch_shutdown
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
_require_prjquota $SCRATCH_DEV
_scratch_unmount
testfile=$SCRATCH_MNT/testfile