Grow the container rootfs when it is necessary

Signed-off-by: mYmNeo <thomassong@tencent.com>
Upstream-commit: 34a66a14af326a259d4ff9fb84db6f678f116a17
Component: engine
This commit is contained in:
mYmNeo
2016-04-12 09:27:47 +08:00
parent 5dca3a7e01
commit 897c0b707e
@@ -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