Add global lisafs kernel flag.

PiperOrigin-RevId: 401296116
This commit is contained in:
Ayush Ranjan
2021-10-06 11:31:16 -07:00
committed by gVisor bot
parent cb0ae997f3
commit a259115490
2 changed files with 13 additions and 7 deletions
+11 -3
View File
@@ -78,11 +78,19 @@ import (
"gvisor.dev/gvisor/pkg/tcpip"
)
// VFS2Enabled is set to true when VFS2 is enabled. Added as a global for allow
// easy access everywhere. To be removed once VFS2 becomes the default.
// VFS2Enabled is set to true when VFS2 is enabled. Added as a global to allow
// easy access everywhere.
//
// TODO(gvisor.dev/issue/1624): Remove when VFS1 is no longer used.
var VFS2Enabled = false
// FUSEEnabled is set to true when FUSE is enabled. Added as a global for allow
// LISAFSEnabled is set to true when lisafs protocol is enabled. Added as a
// global to allow easy access everywhere.
//
// TODO(gvisor.dev/issue/6319): Remove when lisafs is default.
var LISAFSEnabled = false
// FUSEEnabled is set to true when FUSE is enabled. Added as a global to allow
// easy access everywhere. To be removed once FUSE is completed.
var FUSEEnabled = false
+2 -4
View File
@@ -241,10 +241,8 @@ func New(args Args) (*Loader, error) {
// Is this a VFSv2 kernel?
if args.Conf.VFS2 {
kernel.VFS2Enabled = true
if args.Conf.FUSE {
kernel.FUSEEnabled = true
}
kernel.FUSEEnabled = args.Conf.FUSE
kernel.LISAFSEnabled = args.Conf.Lisafs
vfs2.Override()
}