From 7b160fbb76aa2b48a267e82cbdca8c1f015ff647 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 26 Aug 2021 23:13:51 +0200 Subject: [PATCH] perf: use performance-enhancing FUSE mount options --- fuse/mount/fuse.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fuse/mount/fuse.go b/fuse/mount/fuse.go index c317f5e7dc2..7fd29e33df2 100644 --- a/fuse/mount/fuse.go +++ b/fuse/mount/fuse.go @@ -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