Skip to content

Commit

Permalink
fuse: add fuse option async_dio (#4986)
Browse files Browse the repository at this point in the history
  • Loading branch information
SandyXSD authored Jul 4, 2024
1 parent 102acc4 commit e1c991f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/fuse/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ func Serve(v *vfs.VFS, options string, xattrs, ioctl bool) error {
opt.MaxReadAhead = 1 << 20
opt.DirectMount = true
opt.AllowOther = os.Getuid() == 0
opt.OtherCaps |= fuse.CAP_ASYNC_DIO

if opt.EnableAcl && conf.NonDefaultPermission {
logger.Warnf("it is recommended to turn on 'default-permissions' when enable acl")
Expand All @@ -476,6 +475,8 @@ func Serve(v *vfs.VFS, options string, xattrs, ioctl bool) error {
opt.Debug = true
} else if n == "writeback_cache" {
opt.EnableWriteback = true
} else if n == "async_dio" {
opt.OtherCaps |= fuse.CAP_ASYNC_DIO
} else if strings.TrimSpace(n) != "" {
opt.Options = append(opt.Options, strings.TrimSpace(n))
}
Expand Down

0 comments on commit e1c991f

Please sign in to comment.