From b928a241efc838d378d531ba2446e8611d95c1ac Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Thu, 21 Oct 2021 15:45:54 -0700 Subject: 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 --- runsc/config/flags.go | 2 +- runsc/container/container_test.go | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'runsc') 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 { -- cgit v1.2.3