@cryptotaxi247 / kubo / commits / 60fdf22cc

perf: use performance-enhancing FUSE mount options

(cherry picked from commit 7b160fbb76aa2b48a267e82cbdca8c1f015ff647)

Max committed Aug 26, 2021 at 23:13 UTC 60fdf22cc804f79b800b1c03ea5ee97e061b9a15
1 file changed +7 -3
fuse/mount/fuse.go
+7 -3
@@ -33,11 +33,15 @@ func NewMount(p goprocess.Process, fsys fs.FS, mountpoint string, allow_other bo
33 var conn *fuse.Conn
34 var err error
35
36 + var mountOpts = []fuse.MountOption{
37 + fuse.MaxReadahead(64 * 1024 * 1024),
38 + fuse.AsyncRead(),
39 + }
40 +
41 if allow_other {
37 - conn, err = fuse.Mount(mountpoint, fuse.AllowOther())
38 - } else {
39 - conn, err = fuse.Mount(mountpoint)
42 + mountOpts = append(mountOpts, fuse.AllowOther())
43 }
44 + conn, err = fuse.Mount(mountpoint, mountOpts...)
45
46 if err != nil {
47 return nil, err