mirror of
https://github.com/containerd/containerd.git
synced 2026-08-03 22:50:44 +00:00
Add a --dmverity flag to `ctr images build-erofs-cache`. When set, each cached erofs blob is dm-verity formatted (the hash tree is appended in place) and a .dmverity sidecar is written alongside it. This is required when the erofs snapshotter runs with dmverity_mode=on, which rejects cache hits that lack a sidecar; without it such layers would have to be formatted out-of-band. Extract the differ's dm-verity formatting into a shared dmverity.FormatLayer so the differ and the cache builder share one implementation; the differ's formatDmverityLayer now delegates to it. Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>