diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-10-12 21:58:37 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-10-12 21:58:37 -0700 |
| commit | b18f21cce178b60531086f164d24e832a7b6eb86 (patch) | |
| tree | 328a7050a256977bef47edd9e45bff7fb5cb1eb6 /weed/filesys | |
| parent | f022aff289d509e93a93a0e8386693876d1be240 (diff) | |
| download | seaweedfs-b18f21cce178b60531086f164d24e832a7b6eb86.tar.xz seaweedfs-b18f21cce178b60531086f164d24e832a7b6eb86.zip | |
mount: fix bound tree with filer.path
fix https://github.com/chrislusf/seaweedfs/issues/1528
Diffstat (limited to 'weed/filesys')
| -rw-r--r-- | weed/filesys/meta_cache/meta_cache.go | 4 | ||||
| -rw-r--r-- | weed/filesys/wfs.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/weed/filesys/meta_cache/meta_cache.go b/weed/filesys/meta_cache/meta_cache.go index bb81d6d27..247f0ce81 100644 --- a/weed/filesys/meta_cache/meta_cache.go +++ b/weed/filesys/meta_cache/meta_cache.go @@ -22,10 +22,10 @@ type MetaCache struct { uidGidMapper *UidGidMapper } -func NewMetaCache(dbFolder string, uidGidMapper *UidGidMapper) *MetaCache { +func NewMetaCache(dbFolder string, baseDir util.FullPath, uidGidMapper *UidGidMapper) *MetaCache { return &MetaCache{ localStore: openMetaStore(dbFolder), - visitedBoundary: bounded_tree.NewBoundedTree(), + visitedBoundary: bounded_tree.NewBoundedTree(baseDir), uidGidMapper: uidGidMapper, } } diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index 57b4c3da5..265fc95a8 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -92,7 +92,7 @@ func NewSeaweedFileSystem(option *Option) *WFS { wfs.chunkCache = chunk_cache.NewTieredChunkCache(256, cacheDir, option.CacheSizeMB, 1024*1024) } - wfs.metaCache = meta_cache.NewMetaCache(path.Join(cacheDir, "meta"), option.UidGidMapper) + wfs.metaCache = meta_cache.NewMetaCache(path.Join(cacheDir, "meta"), util.FullPath(option.FilerMountRootPath), option.UidGidMapper) startTime := time.Now() go meta_cache.SubscribeMetaEvents(wfs.metaCache, wfs.signature, wfs, wfs.option.FilerMountRootPath, startTime.UnixNano()) grace.OnInterrupt(func() { |
