diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-28 14:07:16 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-28 14:07:16 -0700 |
| commit | a75d50bbb81998731cc36b8299cbb3254421f27a (patch) | |
| tree | 9b3e734157e19cba67696490a983a6e2ed218383 /weed/filesys/wfs.go | |
| parent | 826bc0b7e3b5eb0717c179987a32e3290e773527 (diff) | |
| download | seaweedfs-a75d50bbb81998731cc36b8299cbb3254421f27a.tar.xz seaweedfs-a75d50bbb81998731cc36b8299cbb3254421f27a.zip | |
FUSE: add configurable in memory chunk cache size
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 059a0ecc1..590c39790 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -22,17 +22,18 @@ import ( ) type Option struct { - FilerGrpcAddress string - GrpcDialOption grpc.DialOption - FilerMountRootPath string - Collection string - Replication string - TtlSec int32 - ChunkSizeLimit int64 - DataCenter string - DirListCacheLimit int64 - EntryCacheTtl time.Duration - Umask os.FileMode + FilerGrpcAddress string + GrpcDialOption grpc.DialOption + FilerMountRootPath string + Collection string + Replication string + TtlSec int32 + ChunkSizeLimit int64 + ChunkCacheCountLimit int64 + DataCenter string + DirListCacheLimit int64 + EntryCacheTtl time.Duration + Umask os.FileMode MountUid uint32 MountGid uint32 @@ -81,7 +82,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { return make([]byte, option.ChunkSizeLimit) }, }, - chunkCache: pb_cache.NewChunkCache(), + chunkCache: pb_cache.NewChunkCache(option.ChunkCacheCountLimit), } wfs.root = &Dir{name: wfs.option.FilerMountRootPath, wfs: wfs} |
