Add _require_clone_mount() to common/rc to check whether the filesystem supports mounting cloned block devices simultaneously. For Btrfs, it verifies kernel support for the temp_fsid feature, while skipping unsupported filesystem types with _notrun. Signed-off-by: Anand Jain --- common/rc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/rc b/common/rc index 3958ac934980..7868e6d311a2 100644 --- a/common/rc +++ b/common/rc @@ -6124,6 +6124,21 @@ _force_inplace_writes() esac } +_require_clone_mount() +{ + case "$FSTYP" in + xfs|ext4|f2fs) + # No kernel-side restriction; always supported + ;; + btrfs) + _require_btrfs_fs_feature "temp_fsid" + ;; + *) + _notrun "$FSTYP does not support mounting cloned devices simultaneously" + ;; + esac +} + # Test that a filesystem can do writes to a file in place (without allocating # new extents, without Copy-On-Write semantics). _require_inplace_writes() -- 2.43.0