mirror of
https://github.com/containerd/containerd.git
synced 2026-08-09 17:39:22 +00:00
Add a layer_content_cache option to the erofs snapshotter: a directory of pre-converted, diffID-keyed erofs layer blobs (in production a read-only mountpoint-s3/FUSE mount) that the snapshotter sources layers from on pull instead of downloading and converting them per node. On an image-layer extraction Prepare, if the layer's blob is present in the cache the snapshotter stages it as a symlink, commits it as the target chainID in the same transaction, and returns ErrAlreadyExists. This uses the existing remote-snapshot protocol, so containerd skips both the layer download and the tar->erofs conversion; no core changes are needed. Any miss (cache disabled, no snapshot.ref/diff-id labels, blob absent, unreadable cache) falls through to the normal path, so pulls keep working. Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>