diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-09 21:56:09 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-09 21:56:09 -0700 |
| commit | e74dc4e4bca245828df180f516973e5d6ac2e1df (patch) | |
| tree | 00b2251054b30579b64c8f4c75c93329ee72896a /weed/filesys/wfs.go | |
| parent | 4f195a54ca5c048a0684f3cf9fadfe0a1fb184c5 (diff) | |
| download | seaweedfs-e74dc4e4bca245828df180f516973e5d6ac2e1df.tar.xz seaweedfs-e74dc4e4bca245828df180f516973e5d6ac2e1df.zip | |
add back fs node cache for renaming
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 9ef597024..22f0b655a 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -63,6 +63,7 @@ type WFS struct { stats statsCache root fs.Node + fsNodeCache *FsCache chunkCache *chunk_cache.ChunkCache metaCache *meta_cache.MetaCache @@ -82,7 +83,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { }, }, } - cacheUniqueId := util.Base64Md5([]byte(option.FilerGrpcAddress + option.FilerMountRootPath + util.Version()))[0:4] + cacheUniqueId := util.Md5String([]byte(option.FilerGrpcAddress + option.FilerMountRootPath + util.Version()))[0:4] cacheDir := path.Join(option.CacheDir, cacheUniqueId) if option.CacheSizeMB > 0 { os.MkdirAll(cacheDir, 0755) @@ -100,6 +101,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { }) wfs.root = &Dir{name: wfs.option.FilerMountRootPath, wfs: wfs} + wfs.fsNodeCache = newFsCache(wfs.root) return wfs } |
