diff --git a/client/fuse.go b/client/fuse.go index 1475280b5..736d57c09 100644 --- a/client/fuse.go +++ b/client/fuse.go @@ -696,7 +696,8 @@ func parseMountOption(cfg *config.Config) (*proto.MountOptions, error) { opt.ReadThreads = GlobalMountOptions[proto.ReadThreads].GetInt64() opt.WriteThreads = GlobalMountOptions[proto.WriteThreads].GetInt64() opt.BcacheDir = GlobalMountOptions[proto.BcacheDir].GetString() - if _, err := os.Stat(bcache.UnixSocketPath); err == nil { + opt.EnableBcache = GlobalMountOptions[proto.EnableBcache].GetBool() + if _, err := os.Stat(bcache.UnixSocketPath); err == nil && !opt.EnableBcache { opt.EnableBcache = true } opt.BuffersTotalLimit = GlobalMountOptions[proto.BuffersTotalLimit].GetInt64()