Merge pull request #5655 from kzys/dm-log

snapshot/devmapper: log exported methods correctly
This commit is contained in:
Maksym Pavlenko 2021-06-25 10:06:11 -07:00 committed by GitHub
commit 0bd2a86b1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,7 +204,7 @@ func (s *Snapshotter) Prepare(ctx context.Context, key, parent string, opts ...s
// View creates readonly thin device for the given snapshot key
func (s *Snapshotter) View(ctx context.Context, key, parent string, opts ...snapshots.Opt) ([]mount.Mount, error) {
log.G(ctx).WithFields(logrus.Fields{"key": key, "parent": parent}).Debug("prepare")
log.G(ctx).WithFields(logrus.Fields{"key": key, "parent": parent}).Debug("view")
var (
mounts []mount.Mount
@ -490,6 +490,8 @@ func (s *Snapshotter) withTransaction(ctx context.Context, writable bool, fn fun
// Cleanup cleans up all removed and unused resources
func (s *Snapshotter) Cleanup(ctx context.Context) error {
log.G(ctx).Debug("cleanup")
var removedDevices []*DeviceInfo
if !s.config.AsyncRemove {