Browse code

Grow the container rootfs when it is necessary

Signed-off-by: mYmNeo <thomassong@tencent.com>

mYmNeo authored on 2016/04/12 10:27:47
Showing 1 changed files
... ...
@@ -1880,7 +1880,7 @@ func (devices *DeviceSet) AddDevice(hash, baseHash string, storageOpt map[string
1880 1880
 	}
1881 1881
 
1882 1882
 	// Grow the container rootfs.
1883
-	if size > 0 {
1883
+	if size > baseInfo.Size {
1884 1884
 		info, err := devices.lookupDevice(hash)
1885 1885
 		if err != nil {
1886 1886
 			return err