Expand description
Layer reading and metadata handling.
This module provides access to individual overlay layers and their metadata. Layers are the fundamental storage units in the overlay driver, representing filesystem changes that are stacked to form complete container images.
§Overview
The Layer struct represents a single layer in the overlay filesystem.
Each layer contains:
- A
diff/directory with the actual file contents - A
linkfile containing a short 26-character identifier - A
lowerfile listing parent layers (if not a base layer) - Metadata for whiteouts and opaque directories
§Layer Structure
Each layer is stored in overlay/<layer-id>/:
overlay/<layer-id>/
+-- diff/ # Layer file contents
| +-- etc/
| | +-- hosts
| +-- usr/
| +-- bin/
+-- link # Short link ID (26 chars)
+-- lower # Parent references: "l/<link-id>:l/<link-id>:..."§Whiteouts and Opaque Directories
The overlay driver uses special markers to indicate file deletions:
.wh.<filename>- Whiteout file (marks<filename>as deleted).wh..wh..opq- Opaque directory marker (hides lower layer contents)
Structs§
- Layer
- Represents an overlay layer with its metadata and content.