summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-07-08 17:10:35 -0700
committergVisor bot <gvisor-bot@google.com>2020-07-08 17:12:29 -0700
commitc4815af9475cc4680c6d598d9c930de892c98aae (patch)
tree70ed0957bbb522da0bd268ea14ae3ac066c477d2 /pkg/sentry/vfs
parent4f7af437e25382bdf75b880d1bf3184eae725231 (diff)
Add shared mount hints to VFS2
Container restart test is disabled for VFS2 for now. Updates #1487 PiperOrigin-RevId: 320296401
Diffstat (limited to 'pkg/sentry/vfs')
-rw-r--r--pkg/sentry/vfs/vfs.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go
index 58c7ad778..522e27475 100644
--- a/pkg/sentry/vfs/vfs.go
+++ b/pkg/sentry/vfs/vfs.go
@@ -123,6 +123,9 @@ type VirtualFilesystem struct {
// Init initializes a new VirtualFilesystem with no mounts or FilesystemTypes.
func (vfs *VirtualFilesystem) Init() error {
+ if vfs.mountpoints != nil {
+ panic("VFS already initialized")
+ }
vfs.mountpoints = make(map[*Dentry]map[*Mount]struct{})
vfs.devices = make(map[devTuple]*registeredDevice)
vfs.anonBlockDevMinorNext = 1