Skip to content

Commit d755525

Browse files
committed
Follow the fstype in the bottom layer if possible
To make sure that we won't get surprise. Signed-off-by: Gao Xiang <[email protected]>
1 parent a1002a8 commit d755525

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pkg/snapshot/storage.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,15 @@ func (o *snapshotter) constructOverlayBDSpec(ctx context.Context, key string, wr
542542

543543
configJSON.RepoBlobURL = blobPrefixURL
544544
if isTurboOCI, dataDgst, compType := o.checkTurboOCI(info.Labels); isTurboOCI {
545-
fsmeta, _ := o.turboOCIFsMeta(id)
545+
var fsmeta string
546+
547+
// If parent layers exist, follow the meta choice from the bottom layer
548+
if info.Parent != "" {
549+
_, fsmeta = filepath.Split(configJSON.Lowers[0].File)
550+
fsmeta = filepath.Join(o.root, "snapshots", id, "fs", fsmeta)
551+
} else {
552+
fsmeta, _ = o.turboOCIFsMeta(id)
553+
}
546554
lower := sn.OverlayBDBSConfigLower{
547555
Dir: o.upperPath(id),
548556
// keep this to support ondemand turboOCI loading.

0 commit comments

Comments
 (0)