Skip to content

Commit

Permalink
c8d/progress: Remove unused mountable
Browse files Browse the repository at this point in the history
It's no longer needed as we get this information from containerd
directly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
  • Loading branch information
vvoland committed Oct 12, 2023
1 parent bcbbd95 commit 44dbbeb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 27 deletions.
3 changes: 0 additions & 3 deletions daemon/containerd/image_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
25 changes: 1 addition & 24 deletions daemon/containerd/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 44dbbeb

Please sign in to comment.