Skip to content

Commit

Permalink
enhance:add enableBcache to mountoptions.
Browse files Browse the repository at this point in the history
Signed-off-by: tianjiongzhang <[email protected]>
  • Loading branch information
zhangtianjiong authored and leonrayang committed Aug 10, 2022
1 parent 0d28d12 commit 560516a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/fuse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 560516a

Please sign in to comment.