Commit 9f37b5fe authored by Pingan2017's avatar Pingan2017

fix freespace for image GC

parent 5d144152
...@@ -351,7 +351,7 @@ func (im *realImageGCManager) freeSpace(bytesToFree int64, freeTime time.Time) ( ...@@ -351,7 +351,7 @@ func (im *realImageGCManager) freeSpace(bytesToFree int64, freeTime time.Time) (
// Images that are currently in used were given a newer lastUsed. // Images that are currently in used were given a newer lastUsed.
if image.lastUsed.Equal(freeTime) || image.lastUsed.After(freeTime) { if image.lastUsed.Equal(freeTime) || image.lastUsed.After(freeTime) {
glog.V(5).Infof("Image ID %s has lastUsed=%v which is >= freeTime=%v, not eligible for garbage collection", image.id, image.lastUsed, freeTime) glog.V(5).Infof("Image ID %s has lastUsed=%v which is >= freeTime=%v, not eligible for garbage collection", image.id, image.lastUsed, freeTime)
break continue
} }
// Avoid garbage collect the image if the image is not old enough. // Avoid garbage collect the image if the image is not old enough.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment