xfs/087: give quota mount option per filesystem
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 12 Feb 2015 03:22:33 +0000 (14:22 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 12 Feb 2015 03:22:33 +0000 (14:22 +1100)
This patch add _get_quota_option to assign the mount option selectively.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/xfs/087

index 8da0f9c697ea77faa381b692d3e18152319657d7..38be6d5e9c36c4fccea812c4c1eac38efce85b2b 100755 (executable)
@@ -53,6 +53,18 @@ _do_meta()
     fi
 }
 
+_get_quota_option()
+{
+    case $FSTYP in
+    xfs)
+        _require_xfs_quota
+        echo "-o uquota"
+        ;;
+    *)
+        ;;
+    esac
+}
+
 # real QA test starts here
 _supported_fs xfs
 _supported_os IRIX Linux
@@ -62,7 +74,8 @@ _require_scratch
 _require_scratch_shutdown
 _require_logstate
 _require_v2log 
-_require_xfs_quota
+
+QUOTA_OPTION=`_get_quota_option`
 
 echo "*** init FS"
 umount $SCRATCH_DEV >/dev/null 2>&1
@@ -90,7 +103,7 @@ do
 
     # mount the FS
     _echofull "mount"
-    if ! _scratch_mount -o uquota >>$seqres.full 2>&1; then
+    if ! _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then
        _echofull "mount failed: $MOUNT_OPTIONS"
        continue
     fi
@@ -116,7 +129,7 @@ do
     _scratch_xfs_logprint -n >>$seqres.full 2>&1
 
     _echofull "mount with replay"
-    _scratch_mount -o uquota >>$seqres.full 2>&1 \
+    _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \
        || _fail "mount failed: $MOUNT_OPTIONS"
 
     # check on what FS looks like after log recovery