mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add locking to fuse loopback file system handler to appease race detector.
PiperOrigin-RevId: 574540305
This commit is contained in:
committed by
gVisor bot
parent
4024c736ae
commit
cd1c1599d6
@@ -57,7 +57,16 @@ func main() {
|
||||
log.Warningf("could not create loopback root: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
opts := &fuse.MountOptions{DirectMountStrict: true, Debug: *debug, AllowOther: true, Options: []string{"default_permissions"}}
|
||||
opts := &fuse.MountOptions{
|
||||
DirectMountStrict: true,
|
||||
Debug: *debug,
|
||||
AllowOther: true,
|
||||
// SingleThreaded adds locking the the fuse server handler. We need to
|
||||
// enable this so that the go race detector doesn't detect a data race, even
|
||||
// if there isn't a logical race.
|
||||
SingleThreaded: true,
|
||||
Options: []string{"default_permissions"},
|
||||
}
|
||||
rawFS := fs.NewNodeFS(loopbackRoot, &fs.Options{NullPermissions: true, Logger: golog.Default()})
|
||||
server, err := fuse.NewServer(rawFS, *dir, opts)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user