summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/host/control.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-03-14 07:13:15 -0700
committergVisor bot <gvisor-bot@google.com>2020-03-14 07:14:33 -0700
commit5e413cad10d2358a21dd08216953faee70e62a0b (patch)
tree672fc1c7a2ca334ea24a16f54caa83283da64f4b /pkg/sentry/fs/host/control.go
parent45a8ae240dd180f1b8b4c56e77ac67e4cd3af96f (diff)
Plumb VFS2 imported fds into virtual filesystem.
- When setting up the virtual filesystem, mount a host.filesystem to contain all files that need to be imported. - Make read/preadv syscalls to the host in cases where preadv2 may not be supported yet (likewise for writing). - Make save/restore functions in kernel/kernel.go return early if vfs2 is enabled. PiperOrigin-RevId: 300922353
Diffstat (limited to 'pkg/sentry/fs/host/control.go')
-rw-r--r--pkg/sentry/fs/host/control.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fs/host/control.go b/pkg/sentry/fs/host/control.go
index 1658979fc..cd84e1337 100644
--- a/pkg/sentry/fs/host/control.go
+++ b/pkg/sentry/fs/host/control.go
@@ -32,6 +32,8 @@ func newSCMRights(fds []int) control.SCMRights {
}
// Files implements control.SCMRights.Files.
+//
+// TODO(gvisor.dev/issue/2017): Port to VFS2.
func (c *scmRights) Files(ctx context.Context, max int) (control.RightsFiles, bool) {
n := max
var trunc bool