Skip to main content

Module overlay

Module overlay 

Source
Expand description

Rootfs overlay — the v1 overlay backend (native only).

This is the v1 engine of the hyprstream overlay interface: it builds an FsMount backed by fuse_backend_rs::OverlayFs(lower, upper), exposed through the FuseFileSystemMount up-adapter. Copy-up and whiteouts are performed by OverlayFs — Kata’s production overlay — not by us. We deliberately do not hand-roll copy-on-write here; a native hyprstream CoW engine (per-tenant writable layers over shared RO model weights, delta/sandbox snapshots) is the backlog ticket #370 and will implement the same FsMount trait with zero consumer churn.

Layers are parameterised as BoxedLayers so FS-B can later pass a RAFS lower (via nydus-rafs) without touching this code. For unit testing — and as the shape FS-B0/FS-B will reuse — passthrough_layer wraps a host directory (PassthroughFs) as a layer.

Functions§

layer_from_fs
Wrap any fuse_backend_rs [Layer] (a FileSystem that also implements the overlay Layer trait) as a BoxedLayer usable by rootfs_overlay.
passthrough_layer
Build a BoxedLayer from a host directory using PassthroughFs.
passthrough_rootfs_overlay
Convenience: build a passthrough-backed rootfs overlay from host directories.
rootfs_overlay
Build the v1 rootfs overlay as an [FsMount].