Skip to content

Commit da1720d

Browse files
committed
Use OverlayBDBlobFsType label for converter if exists
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
1 parent ca81c09 commit da1720d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pkg/snapshot/storage.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,14 @@ func (o *snapshotter) constructOverlayBDSpec(ctx context.Context, key string, wr
535535
// 2. convert local layer.tarmeta to overlaybd
536536
// 3. create layer's config
537537
var opt *utils.ConvertOption
538-
rootfs_type := o.defaultFsType
538+
var rootfs_type string
539+
540+
if info.Labels[label.OverlayBDBlobFsType] != "" {
541+
rootfs_type = info.Labels[label.OverlayBDBlobFsType]
542+
} else {
543+
rootfs_type = o.defaultFsType
544+
}
545+
539546
if rootfs_type == "erofs" {
540547
opt = &utils.ConvertOption{
541548
TarMetaPath: o.overlaybdOCILayerPath(id),

0 commit comments

Comments
 (0)