depot/patches/base/ipfs/ipfs-fuse-big-chunks.patch

24 lines
649 B
Diff
Raw Normal View History

2021-06-05 23:59:06 +03:00
diff --git a/fuse/mount/fuse.go b/fuse/mount/fuse.go
index c317f5e7d..6e3951757 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