xfstests: Use $MKFS_OPTIONS in _scratch_mkfs_*()
authorLukas Czerner <lczerner@redhat.com>
Wed, 29 Sep 2010 16:23:04 +0000 (11:23 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 29 Sep 2010 16:23:04 +0000 (11:23 -0500)
Pass MKFS_OPTIONS to mkfs.$FSTYP in _scratch_mkfs_sized().
Preserve user defined MKFS_OPTIONS in _scratch_mkfs_geom().

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redaht.com>
common.rc

index bc2d318bbbc3b608a709d903a6ed0611aa1c4cea..b3bb65c6c808d6e93518c1dfe85b240e4a62741f 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -327,7 +327,7 @@ _scratch_mkfs_sized()
        _scratch_mkfs_xfs -d size=$fssize -b size=$blocksize
        ;;
     ext2|ext3|ext4)
-       /sbin/mkfs.$FSTYP -b $blocksize $SCRATCH_DEV $blocks
+       /sbin/mkfs.$FSTYP $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
        ;;
     *)
        _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
@@ -349,10 +349,10 @@ _scratch_mkfs_geom()
 
     case $FSTYP in
     xfs)
-       MKFS_OPTIONS="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
+       MKFS_OPTIONS+="-b size=$blocksize, -d su=$sunit_bytes,sw=$swidth_mult"
        ;;
     ext4)
-       MKFS_OPTIONS="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
+       MKFS_OPTIONS+="-b $blocksize -E stride=$sunit_blocks,stripe_width=$swidth_blocks"
        ;;
     *)
        _notrun "can't mkfs $FSTYP with geometry"