From 162742c40d0a29ce88bd550059ddcbbc6230fb1a Mon Sep 17 00:00:00 2001 From: zhijian Date: Thu, 12 Dec 2024 13:48:13 +0800 Subject: [PATCH] mount:set the EnableWriteback parameter according to the fuse option --- pkg/fuse/fuse.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/fuse/fuse.go b/pkg/fuse/fuse.go index 7ef1054f7931..70cccb6e2583 100644 --- a/pkg/fuse/fuse.go +++ b/pkg/fuse/fuse.go @@ -529,6 +529,8 @@ func GenFuseOpt(conf *vfs.Config, options string, mt int, noxattr, noacl bool) f opt.AllowOther = true } else if strings.HasPrefix(n, "fsname=") { opt.FsName = n[len("fsname="):] + } else if n == "writeback_cache" { + opt.EnableWriteback = true } else if n == "debug" { opt.Debug = true log.SetFlags(log.Ldate | log.Ltime | log.Lmicroseconds)