summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorCarlos Maiolino <cmaiolino@redhat.com>2023-05-24 15:42:07 +0200
committerZorro Lang <zlang@kernel.org>2023-06-18 21:08:32 +0800
commit87f90a2dae7a4adb7a0a314e27abae9aa1de78fb (patch)
tree94d92f2e1d7d10c453bc9c04846c5973546a0c3f /common
parent7cef6bf6dc8d10648a3208c8c629c3eb72e93135 (diff)
common/rc: Enable _test_mkfs to force a mkfs on a xfs filesystemv2023.06.18
Calling _test_mkfs on an already initialized xfs FS will fail as the initialization is not enforced by '-f' argument, unless it's included in MKFS_OPTIONS. So, adding 'RECREATE_TEST_DEV=true' to the config file end up being useless for xfs filesystems. So, adding the a specific xfs optiong in _test_mkfs using -f argument makes RECREATE_TEST_DEV actually useful. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'common')
-rw-r--r--common/rc3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/rc b/common/rc
index d9df7b7a..741579af 100644
--- a/common/rc
+++ b/common/rc
@@ -605,6 +605,9 @@ _test_mkfs()
ext2|ext3|ext4)
$MKFS_PROG -t $FSTYP -- -F $MKFS_OPTIONS $* $TEST_DEV
;;
+ xfs)
+ $MKFS_PROG -t $FSTYP -- -f $MKFS_OPTIONS $* $TEST_DEV
+ ;;
*)
yes | $MKFS_PROG -t $FSTYP -- $MKFS_OPTIONS $* $TEST_DEV
;;