Browse code

revert "virtualSize" name change

Commit b717de5153db503fae61c11e30f04f400f66a6fd
changed the name of the "size" argument to
"virtualSize", as the "VirtualSize" field
was re-used for calculating the size of all
layers _not_ used by other images.

be20dc15af0cb281bd6d11586cfcc96bd50d12ca reverted
the change in calculation, but did not change
the argument name back to "size".

This changes the name back to its original
name, because since the introduction of the
content-addressable store in docker 1.10,
there no longer is a "virtual" size, so
"size" is a better name for this argument.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2017/01/13 18:25:03
Showing 1 changed files
... ...
@@ -315,13 +315,13 @@ func (daemon *Daemon) SquashImage(id, parent string) (string, error) {
315 315
 	return string(newImgID), nil
316 316
 }
317 317
 
318
-func newImage(image *image.Image, virtualSize int64) *types.ImageSummary {
318
+func newImage(image *image.Image, size int64) *types.ImageSummary {
319 319
 	newImage := new(types.ImageSummary)
320 320
 	newImage.ParentID = image.Parent.String()
321 321
 	newImage.ID = image.ID().String()
322 322
 	newImage.Created = image.Created.Unix()
323
-	newImage.Size = virtualSize
324
-	newImage.VirtualSize = virtualSize
323
+	newImage.Size = size
324
+	newImage.VirtualSize = size
325 325
 	newImage.SharedSize = -1
326 326
 	newImage.Containers = -1
327 327
 	if image.Config != nil {