summaryrefslogtreecommitdiff
path: root/common/overlay
diff options
context:
space:
mode:
Diffstat (limited to 'common/overlay')
-rw-r--r--common/overlay13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/overlay b/common/overlay
index 452b3b09..816ed66d 100644
--- a/common/overlay
+++ b/common/overlay
@@ -201,6 +201,19 @@ _require_scratch_overlay_features()
_scratch_unmount
}
+# Check kernel support for <lowerdirs>::<lowerdatadir> format
+_require_scratch_overlay_lowerdata_layers()
+{
+ local lowerdirs="$OVL_BASE_SCRATCH_MNT/$OVL_UPPER::$OVL_BASE_SCRATCH_MNT/$OVL_LOWER"
+
+ _scratch_mkfs > /dev/null 2>&1
+ _overlay_scratch_mount_dirs "$lowerdirs" "-" "-" \
+ -o ro,redirect_dir=follow,metacopy=on > /dev/null 2>&1 || \
+ _notrun "overlay data-only layers not supported on ${SCRATCH_DEV}"
+
+ _scratch_unmount
+}
+
# Helper function to check underlying dirs of overlay filesystem
_overlay_fsck_dirs()
{