Signed-off-by: mYmNeo <thomassong@tencent.com>
| ... | ... |
@@ -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 |