The mkfs.f2fs has an option to build a certain sized filesystem by giving
the number of sectors.
So, this patch adds to use that.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
$MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \
`expr $fssize / 1024`
;;
+ f2fs)
+ # mkfs.f2fs requires # of sectors as an input for the size
+ sector_size=`blockdev --getss $SCRATCH_DEV`
+ $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / $sector_size`
+ ;;
*)
_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
;;