diff options
author | Fabricio Voznika <fvoznika@google.com> | 2018-09-07 12:27:44 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-07 12:28:48 -0700 |
commit | bc81f3fe4a042a15343d2eab44da32d818ac1ade (patch) | |
tree | 808e8e3ebfdf7e43b9f279032cd39e28fb75de98 /runsc/boot/fs.go | |
parent | f895cb4d8b4b37a563b7a5b9dc92eae552084b44 (diff) |
Remove '--file-access=direct' option
It was used before gofer was implemented and it's not
supported anymore.
BREAKING CHANGE: proxy-shared and proxy-exclusive options
are now: shared and exclusive.
PiperOrigin-RevId: 212017643
Change-Id: If029d4073fe60583e5ca25f98abb2953de0d78fd
Diffstat (limited to 'runsc/boot/fs.go')
-rw-r--r-- | runsc/boot/fs.go | 19 |
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), } |