Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

fuse: change to direct io mode

chrislu0da2dfd640a3
diff --git a/weed/command/mount_std.go b/weed/command/mount_std.go
index ce9a998f67..8514f18afc 100644
--- a/weed/command/mount_std.go
+++ b/weed/command/mount_std.go
@@ -175,7 +175,7 @@ func RunMount(option *MountOptions, umask os.FileMode) bool {
fuse.DefaultPermissions(),
fuse.MaxReadahead(1024 * 128),
fuse.AsyncRead(),
- fuse.WritebackCache(),
+ // fuse.WritebackCache(),
fuse.MaxBackground(128),
fuse.CongestionThreshold(128),
}
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index bbc5c8e21e..6cf52ba604 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -96,6 +96,7 @@ func (file *File) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp
func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error) {
glog.V(4).Infof("file %v open %+v", file.fullpath(), req)
+ resp.Flags |= fuse.OpenDirectIO
handle := file.wfs.AcquireHandle(file, req.Uid, req.Gid)