mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #27334 from darrenstahlmsft/ExpandSandboxSizeZero
Windows: Stop expanding sandbox size when no new size is specified
This commit is contained in:
commit
f2c094cb99
1 changed files with 1 additions and 5 deletions
|
@ -37,10 +37,6 @@ import (
|
||||||
const filterDriver = 1
|
const filterDriver = 1
|
||||||
|
|
||||||
var (
|
var (
|
||||||
vmcomputedll = syscall.NewLazyDLL("vmcompute.dll")
|
|
||||||
hcsExpandSandboxSize = vmcomputedll.NewProc("ExpandSandboxSize")
|
|
||||||
hcsSandboxSizeSupported = hcsExpandSandboxSize.Find() == nil
|
|
||||||
|
|
||||||
// mutatedFiles is a list of files that are mutated by the import process
|
// mutatedFiles is a list of files that are mutated by the import process
|
||||||
// and must be backed up and restored.
|
// and must be backed up and restored.
|
||||||
mutatedFiles = map[string]string{
|
mutatedFiles = map[string]string{
|
||||||
|
@ -212,7 +208,7 @@ func (d *Driver) create(id, parent, mountLabel string, readOnly bool, storageOpt
|
||||||
return fmt.Errorf("Failed to parse storage options - %s", err)
|
return fmt.Errorf("Failed to parse storage options - %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if hcsSandboxSizeSupported {
|
if storageOptions.size != 0 {
|
||||||
if err := hcsshim.ExpandSandboxSize(d.info, id, storageOptions.size); err != nil {
|
if err := hcsshim.ExpandSandboxSize(d.info, id, storageOptions.size); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue