mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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 <jaegeuk@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
cd372aa094
commit
a687688b7f
@@ -741,6 +741,11 @@ _scratch_mkfs_sized()
|
|||||||
$MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \
|
$MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \
|
||||||
`expr $fssize / 1024`
|
`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"
|
_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user