瀏覽代碼

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>
Paweł Gronowski 1 年之前
父節點
當前提交
44dbbeb196
共有 2 個文件被更改,包括 1 次插入27 次删除
  1. 0 3
      daemon/containerd/image_push.go
  2. 1 24
      daemon/containerd/progress.go

+ 0 - 3
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.

+ 1 - 24
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 {