diff options
author | Fabricio Voznika <fvoznika@google.com> | 2021-10-21 15:45:54 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-21 15:48:25 -0700 |
commit | b928a241efc838d378d531ba2446e8611d95c1ac (patch) | |
tree | 38525b07e8eb0fab6cd4e593ae1036b3482c4bac /runsc | |
parent | 207221ffb27f2010c46468d827f1817432df3960 (diff) |
Enable VFS2 by default
This change enables VFS2 by default. VFS2 is much faster than the previous
implementation and it's also more compatible. VFS1 is no longer supported and
will be deleted from the code.
Use `--vfs2=false` if you need to disable it. Make sure to report a bug if you
have the need to disable VFS2 or something is not working for you.
Closes #1035
PiperOrigin-RevId: 404898135
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/config/flags.go | 2 | ||||
-rw-r--r-- | runsc/container/container_test.go | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/runsc/config/flags.go b/runsc/config/flags.go index 11cea71b8..663b20d9c 100644 --- a/runsc/config/flags.go +++ b/runsc/config/flags.go @@ -80,7 +80,7 @@ func RegisterFlags() { flag.Bool("overlay", false, "wrap filesystem mounts with writable overlay. All modifications are stored in memory inside the sandbox.") flag.Bool("verity", false, "specifies whether a verity file system will be mounted.") flag.Bool("fsgofer-host-uds", false, "allow the gofer to mount Unix Domain Sockets.") - flag.Bool("vfs2", false, "enables VFSv2. This uses the new VFS layer that is faster than the previous one.") + flag.Bool("vfs2", true, "enables VFSv2. This uses the new VFS layer that is faster than the previous one.") flag.Bool("fuse", false, "TEST ONLY; use while FUSE in VFSv2 is landing. This allows the use of the new experimental FUSE filesystem.") flag.Bool("lisafs", false, "Enables lisafs protocol instead of 9P. This is only effective with VFS2.") flag.Bool("cgroupfs", false, "Automatically mount cgroupfs.") diff --git a/runsc/container/container_test.go b/runsc/container/container_test.go index 69dcf3f03..94e58d921 100644 --- a/runsc/container/container_test.go +++ b/runsc/container/container_test.go @@ -407,9 +407,9 @@ var ( func configsHelper(t *testing.T, opts ...configOption) map[string]*config.Config { // Always load the default config. cs := make(map[string]*config.Config) - testutil.TestConfig(t) for _, o := range opts { c := testutil.TestConfig(t) + c.VFS2 = false switch o { case overlay: c.Overlay = true @@ -2615,6 +2615,8 @@ func TestCat(t *testing.T) { f.Close() spec, conf := sleepSpecConf(t) + // TODO(gvisor.dev/issue/6742): Add VFS2 support. + conf.VFS2 = false _, bundleDir, cleanup, err := testutil.SetupContainer(spec, conf) if err != nil { |