common/rc: support jfs in _scratch_mkfs_sized
authorErnesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Fri, 14 Jul 2017 22:06:19 +0000 (19:06 -0300)
committerEryu Guan <eguan@redhat.com>
Wed, 19 Jul 2017 03:14:55 +0000 (11:14 +0800)
Add support for jfs in _scratch_mkfs_sized. Fix the block size in
4096, which seems to be the only option in jfs_mkfs.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/rc

index fa1314c649cf2825e7fac065d5c9a722ffcb7d89..c537ab4fae545966b0b788b8c047ee16c13e250c 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1023,6 +1023,9 @@ _scratch_mkfs_sized()
     ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2)
        def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
        ;;
+    jfs)
+       def_blksz=4096
+       ;;
     esac
 
     [ -n "$def_blksz" ] && blocksize=$def_blksz
@@ -1068,6 +1071,9 @@ _scratch_mkfs_sized()
        (( fssize <= 100 * 1024 * 1024 )) && mixed_opt='--mixed'
        $MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV
        ;;
+    jfs)
+       ${MKFS_PROG}.$FSTYP $MKFS_OPTIONS $SCRATCH_DEV $blocks
+       ;;
     reiser4)
        # mkfs.resier4 requires size in KB as input for creating filesystem
        $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \