From 914f5260d0d2794d6141d5a31c845617b8975975 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 28 May 2009 11:38:16 -0500 Subject: [PATCH] Set up testdir for generic filesystems Make the default filesystem testdir setup the same as what xfs did; simply set up the testdir variable. Update the comment for UDF & NFS, as to why they are currently doing something different. Signed-off-by: Eric Sandeen Reviewed-by: Christoph Hellwig --- common.rc | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/common.rc b/common.rc index f649bc24..78514f4d 100644 --- a/common.rc +++ b/common.rc @@ -988,15 +988,6 @@ _check_testdir() esac } - -_setup_xfs_testdir() -{ - [ "$FSTYP" != "xfs" ] \ - && _fail "setup_xfs_testdir: \$FSTYP ($FSTYP) is not xfs" - - testdir=$TEST_DIR -} - _setup_udf_scratchdir() { [ "$FSTYP" != "udf" ] \ @@ -1050,16 +1041,17 @@ _setup_nfs_scratchdir() } # -# Warning for UDF and NFS this function calls _setup_udf_scratchdir and -# _setup_udf_scratchdir. This is done because testdir is a persistent -# XFS only partition. +# Warning for UDF and NFS: +# this function calls _setup_udf_scratchdir and _setup_udf_scratchdir +# which actually uses the scratch dir for the test dir. +# +# This was done because testdir was intended to be a persistent +# XFS only partition. This should eventually change, and treat +# at least local filesystems all the same. # _setup_testdir() { case $FSTYP in - xfs) - _setup_xfs_testdir - ;; udf) _setup_udf_scratchdir ;; @@ -1067,7 +1059,7 @@ _setup_testdir() _setup_nfs_scratchdir ;; *) - _fail "\$FSTYP is not xfs, udf or nfs" + testdir=$TEST_DIR ;; esac } @@ -1075,10 +1067,6 @@ _setup_testdir() _cleanup_testdir() { case $FSTYP in - xfs) - # do nothing, testdir is $TEST_DIR - : - ;; udf) # umount testdir as it is $SCRATCH_MNT which could be used by xfs next [ -n "$testdir" ] && $UMOUNT_PROG $testdir @@ -1088,7 +1076,8 @@ _cleanup_testdir() [ -n "$testdir" ] && $UMOUNT_PROG $testdir ;; *) - _fail "\$FSTYP is not xfs, udf or nfs" + # do nothing, testdir is $TEST_DIR + : ;; esac } -- 2.39.5