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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/common/rc b/common/rc index d7e3e0bdfb1e..937f478963b4 100644 --- a/common/rc +++ b/common/rc @@ -414,6 +414,23 @@ _scratch_mount_options() $SCRATCH_DEV $SCRATCH_MNT } +# Return filesystem-specific mount options required for mounting clone/snapshot +# devices. +_clone_mount_option() +{ + local mount_opts="" + + case "$FSTYP" in + xfs) + # Allow mounting a duplicate filesystem on the same host + mount_opts="-o nouuid" + ;; + *) + esac + + echo $mount_opts +} + _supports_filetype() { local dir=$1 -- 2.43.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
