Browse Source

Grow the container rootfs when it is necessary

Signed-off-by: mYmNeo <thomassong@tencent.com>
mYmNeo 9 năm trước cách đây
mục cha
commit
34a66a14af
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      daemon/graphdriver/devmapper/deviceset.go

+ 1 - 1
daemon/graphdriver/devmapper/deviceset.go

@@ -1880,7 +1880,7 @@ func (devices *DeviceSet) AddDevice(hash, baseHash string, storageOpt map[string
 	}
 
 	// Grow the container rootfs.
-	if size > 0 {
+	if size > baseInfo.Size {
 		info, err := devices.lookupDevice(hash)
 		if err != nil {
 			return err