From 03ee450060dff5440fc02e8c88752c8314a8714f Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Thu, 24 Jun 2021 16:14:45 -0700 Subject: [PATCH] snapshot/devmapper: log exported methods correctly - View was somehow logging itself as "prepare" - Cleanup should have its debug log as like other exported methods Signed-off-by: Kazuyoshi Kato --- snapshots/devmapper/snapshotter.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snapshots/devmapper/snapshotter.go b/snapshots/devmapper/snapshotter.go index 8320ba2ea..cfc471e16 100644 --- a/snapshots/devmapper/snapshotter.go +++ b/snapshots/devmapper/snapshotter.go @@ -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 {