From c622fde306001853b46eb66fbacd899ef847557c Mon Sep 17 00:00:00 2001 From: Darren Stahl Date: Wed, 12 Oct 2016 16:58:57 -0700 Subject: [PATCH] Stop expanding sandbox size when no new size is specified Signed-off-by: Darren Stahl Upstream-commit: 0da31c68f11d6e2a795b4e4faf7f969916db5f81 Component: engine --- components/engine/daemon/graphdriver/windows/windows.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/components/engine/daemon/graphdriver/windows/windows.go b/components/engine/daemon/graphdriver/windows/windows.go index 7ec1b106d9..3cb09fdf00 100644 --- a/components/engine/daemon/graphdriver/windows/windows.go +++ b/components/engine/daemon/graphdriver/windows/windows.go @@ -37,10 +37,6 @@ import ( const filterDriver = 1 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 // and must be backed up and restored. 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) } - if hcsSandboxSizeSupported { + if storageOptions.size != 0 { if err := hcsshim.ExpandSandboxSize(d.info, id, storageOptions.size); err != nil { return err }