c8d/progress: Remove unused mountable

It's no longer needed as we get this information from containerd
directly.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski
2023-10-11 11:46:33 +02:00
parent bcbbd9538f
commit 44dbbeb196
2 changed files with 1 additions and 27 deletions

View File

@@ -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.

View File

@@ -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 {