Commit 129662be authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

fuse: on darwin, read the FUSE device with a single goroutine.

This is necessary to work around apparent bugs in the OSX FUSE
implementation.
parent 192d56bb
......@@ -8,6 +8,7 @@ import (
"strings"
"sync"
"syscall"
"runtime"
"time"
"unsafe"
)
......@@ -141,6 +142,10 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
fileSystem: fs,
started: make(chan struct{}),
opts: &o,
// OSX has races when multiple routines read from the
// FUSE device: on unmount, sometime some reads do not
// error-out, meaning that unmount will hang.
singleReader: runtime.GOOS == "darwin",
}
ms.reqPool.New = func() interface{} { return new(request) }
ms.readPool.New = func() interface{} { return make([]byte, o.MaxWrite+PAGESIZE) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment