Skip to content

Commit 6dff475

Browse files
authored
Merge pull request #194 from HileQAQ/main
Erase writable label in Prepare if not overlaybd
2 parents 7794ff7 + 09309f0 commit 6dff475

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/snapshot/overlay.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,11 @@ func (o *snapshotter) createMountPoint(ctx context.Context, kind snapshots.Kind,
527527
// do nothing
528528
}
529529
}
530+
if _, writableBD := info.Labels[label.SupportReadWriteMode]; stype == storageTypeNormal && writableBD {
531+
// if is not overlaybd writable layer, delete label before commit
532+
delete(info.Labels, label.SupportReadWriteMode)
533+
storage.UpdateInfo(ctx, info)
534+
}
530535

531536
rollback = false
532537
if err := t.Commit(); err != nil {

0 commit comments

Comments
 (0)