[PATCH 3/9] fstests: add _clone_mount_option() helper

Anand Jain
2026-02-26T14:42:06Z

Adds _clone_mount_option() helper function to handle filesystem-specific
requirements for mounting cloned devices. Abstract the need for -o nouuid
on XFS.

Signed-off-by: Anand Jain <asj@kernel.org>
---
common/rc | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/common/rc b/common/rc
index 2253438ef0f6..438de54a467b 100644
--- a/common/rc
+++ b/common/rc
@@ -397,6 +397,14 @@ _scratch_mount_options()
$SCRATCH_DEV $SCRATCH_MNT
}

+_clone_mount_option()
+{
+ local mount_opts=""
+ [[ "$FSTYP" == "xfs" ]] && mount_opts="-o nouuid"
+
+ echo $mount_opts
+}
+
_supports_filetype()
{
local dir=$1
--
2.43.0