common/rc: Remove special handing of 'dup' argument for btrfs
authorNikolay Borisov <nborisov@suse.com>
Fri, 27 Sep 2019 10:52:32 +0000 (13:52 +0300)
committerEryu Guan <guaneryu@gmail.com>
Wed, 2 Oct 2019 08:54:59 +0000 (16:54 +0800)
_scratch_pool_mkfs special cases the command executed when 'dup'
option is used when creating a filesystem. This is not true anymore,
since 'dup' works for all profiles and number of devices since
4.5-ish. This is manifested while exercising btrfs' balance argument
combinations test.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc

index bbeabe6426dee1081d996be2538d7f7e052c33f3..cfaabf10ecd90885c8f30f5d18519092c26e20b9 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -885,13 +885,7 @@ _scratch_pool_mkfs()
 {
     case $FSTYP in
     btrfs)
 {
     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
         ;;
     *)
         echo "_scratch_pool_mkfs is not implemented for $FSTYP" 1>&2