Expand description
OverlayFS v2 - Overlay filesystem implementation for VFS v2
This module provides a union/overlay view of multiple filesystems, allowing files and directories from multiple source filesystems to appear as a single unified filesystem hierarchy.
§Features
- Multi-layer support: Combines an optional upper layer (read-write) with multiple lower layers (read-only) in priority order
- Copy-up semantics: Modifications to lower layer files are copied to the upper layer before modification
- Whiteout support: Files can be hidden or deleted from view using special whiteout entries
- Mount point aware: Handles crossing mount boundaries correctly when resolving paths across layers
§Usage
// Create overlay with upper and lower layers
let overlay = OverlayFS::new(
Some((upper_mount, upper_entry)), // Upper layer for writes
vec![(lower_mount, lower_entry)], // Lower layers (read-only)
"my_overlay".to_string()
)?;
§Cross-VFS Support
- Cross-VFS overlays supported: Upper and lower layers can come from different VFS managers, enabling flexible overlay configurations
- Seamless integration: Mount points from different VFS managers are unified transparently through the overlay interface
§Limitations
- Upper layer is required for write operations
- Whiteout files follow the
.wh.filename
convention
Structs§
- Overlay
Directory Object - File object for OverlayFS directory operations
- OverlayFS
- OverlayFS implementation for VFS v2
- OverlayFS
Driver - Driver for creating OverlayFS instances
- Overlay
Node - A composite node that represents a file/directory across overlay layers
Statics§
Functions§
- register_
driver 🔒 - Register the OverlayFS driver with the filesystem driver manager