From: Chao Yu Date: Tue, 25 Mar 2025 12:58:22 +0000 (+0800) Subject: common/rc: use -f for mkfs.f2fs by default X-Git-Tag: v2025.03.30~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=520d651ee9ccc2f7de19cb12d7adaef261debdea;p=xfstests-dev.git common/rc: use -f for mkfs.f2fs by default Otherwise, mkfs will fail due to there is an existing filesystem in the image. Cc: Jaegeuk Kim Reviewed-by: Zorro Lang Signed-off-by: Chao Yu Signed-off-by: Zorro Lang --- diff --git a/common/rc b/common/rc index fa0f02ac..e954e7fd 100644 --- a/common/rc +++ b/common/rc @@ -989,7 +989,7 @@ _scratch_mkfs() mkfs_filter="grep -v -e ^Warning: -e \"^mke2fs \"" ;; f2fs) - mkfs_cmd="$MKFS_F2FS_PROG" + mkfs_cmd="$MKFS_F2FS_PROG -f" mkfs_filter="cat" ;; ocfs2) @@ -1332,7 +1332,7 @@ _try_scratch_mkfs_sized() f2fs) # mkfs.f2fs requires # of sectors as an input for the size local sector_size=`blockdev --getss $SCRATCH_DEV` - $MKFS_F2FS_PROG $MKFS_OPTIONS "$@" $SCRATCH_DEV `expr $fssize / $sector_size` + $MKFS_F2FS_PROG -f $MKFS_OPTIONS "$@" $SCRATCH_DEV `expr $fssize / $sector_size` ;; tmpfs) local free_mem=`_free_memory_bytes`