diff --git a/storage/storage_src.go b/storage/storage_src.go index 03c2fa28c6..f16ff8d9ac 100644 --- a/storage/storage_src.go +++ b/storage/storage_src.go @@ -260,9 +260,10 @@ func (s *storageImageSource) LayerInfosForCopy(ctx context.Context, instanceDige return nil, fmt.Errorf("uncompressed size for layer %q is unknown", layerID) } blobInfo := types.BlobInfo{ - Digest: layer.UncompressedDigest, - Size: layer.UncompressedSize, - MediaType: uncompressedLayerType, + Digest: layer.UncompressedDigest, + Size: layer.UncompressedSize, + MediaType: uncompressedLayerType, + Incremental: layer.Incremental, } physicalBlobInfos = append([]types.BlobInfo{blobInfo}, physicalBlobInfos...) layerID = layer.Parent diff --git a/types/types.go b/types/types.go index 33adb5f1df..aa4c147604 100644 --- a/types/types.go +++ b/types/types.go @@ -151,6 +151,9 @@ type BlobInfo struct { // TODO: To remove together with CompressionOperation in re-design to // remove field out of BlobInfo. CryptoOperation LayerCrypto + // Incremental is used to indicate that the blob was created using a partial + // pull, so the uncompressed digest stored is not correct and must be validated. + Incremental bool // Before adding any fields to this struct, read the NOTE above. }