summaryrefslogtreecommitdiffhomepage
path: root/runsc/boot/fs.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r--runsc/boot/fs.go19
1 files changed, 3 insertions, 16 deletions
diff --git a/runsc/boot/fs.go b/runsc/boot/fs.go
index 772df40fe..3df276170 100644
--- a/runsc/boot/fs.go
+++ b/runsc/boot/fs.go
@@ -204,7 +204,7 @@ func createRootMount(ctx context.Context, spec *specs.Spec, conf *Config, fds *f
)
switch conf.FileAccess {
- case FileAccessProxy, FileAccessProxyExclusive:
+ case FileAccessShared, FileAccessExclusive:
fd := fds.remove()
log.Infof("Mounting root over 9P, ioFD: %d", fd)
hostFS := mustFindFilesystem("9p")
@@ -214,13 +214,6 @@ func createRootMount(ctx context.Context, spec *specs.Spec, conf *Config, fds *f
return nil, fmt.Errorf("failed to generate root mount point: %v", err)
}
- case FileAccessDirect:
- hostFS := mustFindFilesystem("whitelistfs")
- rootInode, err = hostFS.Mount(ctx, rootDevice, mf, "root="+spec.Root.Path+",dont_translate_ownership=true")
- if err != nil {
- return nil, fmt.Errorf("failed to generate root mount point: %v", err)
- }
-
default:
return nil, fmt.Errorf("invalid file access type: %v", conf.FileAccess)
}
@@ -289,13 +282,10 @@ func getMountNameAndOptions(conf *Config, m specs.Mount, fds *fdDispenser) (stri
case bind:
switch conf.FileAccess {
- case FileAccessProxy, FileAccessProxyExclusive:
+ case FileAccessShared, FileAccessExclusive:
fd := fds.remove()
fsName = "9p"
opts = p9MountOptions(conf, fd)
- case FileAccessDirect:
- fsName = "whitelistfs"
- opts = []string{"root=" + m.Source, "dont_translate_ownership=true"}
default:
err = fmt.Errorf("invalid file access type: %v", conf.FileAccess)
}
@@ -423,7 +413,7 @@ func p9MountOptions(conf *Config, fd int) []string {
"wfdno=" + strconv.Itoa(fd),
"privateunixsocket=true",
}
- if conf.FileAccess == FileAccessProxy {
+ if conf.FileAccess == FileAccessShared {
opts = append(opts, "cache=remote_revalidating")
}
return opts
@@ -503,9 +493,6 @@ func addRestoreMount(conf *Config, renv *fs.RestoreEnvironment, m specs.Mount, f
// createRestoreEnvironment builds a fs.RestoreEnvironment called renv by adding the mounts
// to the environment.
func createRestoreEnvironment(spec *specs.Spec, conf *Config, fds *fdDispenser) (*fs.RestoreEnvironment, error) {
- if conf.FileAccess == FileAccessDirect {
- return nil, fmt.Errorf("host filesystem with whitelist not supported with S/R")
- }
renv := &fs.RestoreEnvironment{
MountSources: make(map[string][]fs.MountArgs),
}