summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/fs.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-03-18 18:17:07 +0000
committergVisor bot <gvisor-bot@google.com>2021-03-18 18:17:07 +0000
commitd3a3fe04cccfe8646a4ec8bf9dda0689cf524e07 (patch)
tree038964257a6925f1a024a1b1852fe360d8a4f00f /runsc/boot/fs.go
parent8a3f44a54fe8897e9ec2a66b1a4d8a67511b4986 (diff)
parent5c4f4ed9eb05cfef036b55883edb8de780288441 (diff)
Merge release-20210309.0-39-g5c4f4ed9e (automated)
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r--runsc/boot/fs.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 77f632bb9..d1dacee03 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -103,14 +103,14 @@ func addOverlay(ctx context.Context, conf *config.Config, lower *fs.Inode, name
// compileMounts returns the supported mounts from the mount spec, adding any
// mandatory mounts that are required by the OCI specification.
-func compileMounts(spec *specs.Spec) []specs.Mount {
+func compileMounts(spec *specs.Spec, vfs2Enabled bool) []specs.Mount {
// Keep track of whether proc and sys were mounted.
var procMounted, sysMounted, devMounted, devptsMounted bool
var mounts []specs.Mount
// Mount all submounts from the spec.
for _, m := range spec.Mounts {
- if !specutils.IsSupportedDevMount(m) {
+ if !vfs2Enabled && !specutils.IsVFS1SupportedDevMount(m) {
log.Warningf("ignoring dev mount at %q", m.Destination)
continue
}
@@ -572,10 +572,10 @@ type containerMounter struct {
hints *podMountHints
}
-func newContainerMounter(spec *specs.Spec, goferFDs []*fd.FD, k *kernel.Kernel, hints *podMountHints) *containerMounter {
+func newContainerMounter(spec *specs.Spec, goferFDs []*fd.FD, k *kernel.Kernel, hints *podMountHints, vfs2Enabled bool) *containerMounter {
return &containerMounter{
root: spec.Root,
- mounts: compileMounts(spec),
+ mounts: compileMounts(spec, vfs2Enabled),
fds: fdDispenser{fds: goferFDs},
k: k,
hints: hints,