Skip to content

Commit

Permalink
perf: use performance-enhancing FUSE mount options
Browse files Browse the repository at this point in the history
  • Loading branch information
max-privatevoid authored and aschmahmann committed Aug 27, 2021
1 parent 74633ca commit 7b160fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions fuse/mount/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ func NewMount(p goprocess.Process, fsys fs.FS, mountpoint string, allow_other bo
var conn *fuse.Conn
var err error

var mountOpts = []fuse.MountOption{
fuse.MaxReadahead(64 * 1024 * 1024),
fuse.AsyncRead(),
}

if allow_other {
conn, err = fuse.Mount(mountpoint, fuse.AllowOther())
} else {
conn, err = fuse.Mount(mountpoint)
mountOpts = append(mountOpts, fuse.AllowOther())
}
conn, err = fuse.Mount(mountpoint, mountOpts...)

if err != nil {
return nil, err
Expand Down

0 comments on commit 7b160fb

Please sign in to comment.