aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/xattr.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-06-19 09:45:27 -0700
committerChris Lu <chris.lu@gmail.com>2020-06-19 09:45:42 -0700
commitf7a45d448f5efe1bea7c8fc5ee61cb7d535995b5 (patch)
tree07c9057b7c741dc15c8e1cd5e133ca3d6e9fa709 /weed/filesys/xattr.go
parentc0283eee1ad18d6a3907b186d3e2fc00fab83824 (diff)
downloadseaweedfs-f7a45d448f5efe1bea7c8fc5ee61cb7d535995b5.tar.xz
seaweedfs-f7a45d448f5efe1bea7c8fc5ee61cb7d535995b5.zip
FUSE mount: lazy loading meta cache
Diffstat (limited to 'weed/filesys/xattr.go')
-rw-r--r--weed/filesys/xattr.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/weed/filesys/xattr.go b/weed/filesys/xattr.go
index 940979457..870a72ebe 100644
--- a/weed/filesys/xattr.go
+++ b/weed/filesys/xattr.go
@@ -5,6 +5,7 @@ import (
"github.com/seaweedfs/fuse"
+ "github.com/chrislusf/seaweedfs/weed/filesys/meta_cache"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/util"
)
@@ -113,6 +114,7 @@ func (wfs *WFS) maybeLoadEntry(dir, name string) (entry *filer_pb.Entry, err err
// glog.V(3).Infof("read entry cache miss %s", fullpath)
// read from async meta cache
+ meta_cache.EnsureVisited(wfs.metaCache, wfs, util.FullPath(dir))
cachedEntry, cacheErr := wfs.metaCache.FindEntry(context.Background(), fullpath)
if cacheErr == filer_pb.ErrNotFound {
return nil, fuse.ENOENT