common/rc: Remove special handing of 'dup' argument for btrfs
[xfstests-dev.git] / common / rc
index 66c7fd4d7a6c4c09b6a7ab5a4f6f067d0ccf8cf7..cfaabf10ecd90885c8f30f5d18519092c26e20b9 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -885,13 +885,7 @@ _scratch_pool_mkfs()
 {
     case $FSTYP in
     btrfs)
-        # if dup profile is in mkfs options call _scratch_mkfs instead
-        # because dup profile only works with single device
-        if [[ "$*" =~ dup ]]; then
-            _scratch_mkfs $*
-        else
-            $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV_POOL > /dev/null
-        fi
+        $MKFS_BTRFS_PROG $MKFS_OPTIONS $* $SCRATCH_DEV_POOL > /dev/null
         ;;
     *)
         echo "_scratch_pool_mkfs is not implemented for $FSTYP" 1>&2
@@ -3100,7 +3094,7 @@ _require_scratch_shutdown()
                        # SCRATCH_DEV, in this case OVL_BASE_SCRATCH_DEV
                        # will be null, so check OVL_BASE_SCRATCH_DEV before
                        # running shutdown to avoid shutting down base fs accidently.
-                       _notrun "$SCRATCH_DEV is not a block device"
+                       _notrun "This test requires a valid $OVL_BASE_SCRATCH_DEV as ovl base fs"
                else
                        src/godown -f $OVL_BASE_SCRATCH_MNT 2>&1 \
                        || _notrun "Underlying filesystem does not support shutdown"
@@ -4045,6 +4039,14 @@ _try_wipe_scratch_devs()
 {
        test -x "$WIPEFS_PROG" || return 0
 
+       # Do specified filesystem wipe at first
+       case "$FSTYP" in
+       "xfs")
+               _try_wipe_scratch_xfs
+               ;;
+       esac
+
+       # Then do wipefs on all scratch devices
        for dev in $SCRATCH_DEV_POOL $SCRATCH_DEV $SCRATCH_LOGDEV $SCRATCH_RTDEV; do
                test -b $dev && $WIPEFS_PROG -a $dev
        done