Commit Graph
3 Commits
Author SHA1 Message Date
Maksym Pavlenko 82a47efe92 Support dmverity
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>
2026-07-21 10:07:08 -07:00
Alex Lyn 9c8111b70d dmverity: enhance MetadataPath() with suffix checking
We need enhance MetadataPath() with checking the layerBlobPath's
suffix to ensure it doesn't end with .dmverity.

And add a unit test asserting that MetadataPath("...dmverity")
returns the path unchanged to lock in the new behavior.

Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
2026-04-25 18:29:16 +08:00
Aadhar Agarwal 50f5461fb7 Add dmverity support to the erofs snapshotter using veritysetup-go
Signed-off-by: Aadhar Agarwal <aadagarwal@microsoft.com>
2026-03-31 20:21:39 +00:00