From 44dbbeb19654318eafbaee695fb65be6b7d840aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Wed, 11 Oct 2023 11:46:33 +0200 Subject: [PATCH] c8d/progress: Remove unused mountable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's no longer needed as we get this information from containerd directly. Signed-off-by: Paweł Gronowski --- daemon/containerd/image_push.go | 3 --- daemon/containerd/progress.go | 25 +------------------------ 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/daemon/containerd/image_push.go b/daemon/containerd/image_push.go index 2901f0fe41..c28e992b6f 100644 --- a/daemon/containerd/image_push.go +++ b/daemon/containerd/image_push.go @@ -120,9 +120,6 @@ func (i *ImageService) pushRef(ctx context.Context, targetRef reference.Named, m if err != nil { return err } - for dgst := range mountableBlobs { - pp.addMountable(dgst) - } // Create a store which fakes the local existence of possibly mountable blobs. // Otherwise they can't be pushed at all. diff --git a/daemon/containerd/progress.go b/daemon/containerd/progress.go index 0b2a893da4..8d7ff12bdb 100644 --- a/daemon/containerd/progress.go +++ b/daemon/containerd/progress.go @@ -171,30 +171,7 @@ func (p pullProgress) UpdateProgress(ctx context.Context, ongoing *jobs, out pro } type pushProgress struct { - Tracker docker.StatusTracker - mountable map[digest.Digest]struct{} - mutex sync.Mutex -} - -func (p *pushProgress) addMountable(dgst digest.Digest) { - p.mutex.Lock() - defer p.mutex.Unlock() - - if p.mountable == nil { - p.mountable = map[digest.Digest]struct{}{} - } - p.mountable[dgst] = struct{}{} -} - -func (p *pushProgress) isMountable(dgst digest.Digest) bool { - p.mutex.Lock() - defer p.mutex.Unlock() - - if p.mountable == nil { - return false - } - _, has := p.mountable[dgst] - return has + Tracker docker.StatusTracker } func (p *pushProgress) UpdateProgress(ctx context.Context, ongoing *jobs, out progress.Output, start time.Time) error {