[PATCH v5 02/10] fstests: add _clone_mount_option() helper
Anand Jain <[email protected]>
| Newsgroups | org.kernel.vger.fstests,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <028aae746adda2053ab618518b538b136048cc52.1779367627.git.asj@kernel.org> |
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 <[email protected]> --- common/rc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/rc b/common/rc index a2ee23c45003..7ae9877918c8 100644 --- a/common/rc +++ b/common/rc @@ -397,6 +397,20 @@ _scratch_mount_options() $SCRATCH_DEV $SCRATCH_MNT } +_clone_mount_option() +{ + local mount_opts="" + + case "$FSTYP" in + xfs) + mount_opts="-o nouuid" + ;; + *) + esac + + echo $mount_opts +} + _supports_filetype() { local dir=$1 -- 2.43.0