From a687688b7fd5387b645dea8479f4d82fce233d2e Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Mon, 21 Dec 2015 18:01:47 +1100 Subject: [PATCH] common: support f2fs for _scratch_mkfs_sized 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 Reviewed-by: Dave Chinner Signed-off-by: Dave Chinner --- common/rc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/rc b/common/rc index 4164d9e1..b75afc5a 100644 --- a/common/rc +++ b/common/rc @@ -741,6 +741,11 @@ _scratch_mkfs_sized() $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" ;; -- 2.39.5