Skip to content

Commit

Permalink
Merge pull request #194 from HileQAQ/main
Browse files Browse the repository at this point in the history
Erase writable label in Prepare if not overlaybd
  • Loading branch information
liulanzheng committed May 12, 2023
2 parents 7794ff7 + 09309f0 commit 6dff475
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/snapshot/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ func (o *snapshotter) createMountPoint(ctx context.Context, kind snapshots.Kind,
// do nothing
}
}
if _, writableBD := info.Labels[label.SupportReadWriteMode]; stype == storageTypeNormal && writableBD {
// if is not overlaybd writable layer, delete label before commit
delete(info.Labels, label.SupportReadWriteMode)
storage.UpdateInfo(ctx, info)
}

rollback = false
if err := t.Commit(); err != nil {
Expand Down

0 comments on commit 6dff475

Please sign in to comment.