Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LCOW: Regular mount if only one layer #36052

Merged
merged 1 commit into from
Jan 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
LCOW: Regular mount if only one layer
Signed-off-by: John Howard <jhoward@microsoft.com>
  • Loading branch information
John Howard committed Jan 18, 2018
commit 420dc4eeb48b155e6b83fccf62f8727ce4bf5b21
5 changes: 4 additions & 1 deletion daemon/graphdriver/lcow/lcow_svm.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ func (svm *serviceVM) createUnionMount(mountName string, mvds ...hcsshim.MappedV
}

var cmd string
if mvds[0].ReadOnly {
if len(mvds) == 1 {
// `FROM SCRATCH` case and the only layer. No overlay required.
cmd = fmt.Sprintf("mount %s %s", mvds[0].ContainerPath, mountName)
} else if mvds[0].ReadOnly {
// Readonly overlay
cmd = fmt.Sprintf("mount -t overlay overlay -olowerdir=%s %s",
strings.Join(lowerLayers, ","),
Expand Down