aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/xattr.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filesys/xattr.go')
-rw-r--r--weed/filesys/xattr.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/weed/filesys/xattr.go b/weed/filesys/xattr.go
index 1768c1d6e..7e7b8c60b 100644
--- a/weed/filesys/xattr.go
+++ b/weed/filesys/xattr.go
@@ -1,6 +1,8 @@
package filesys
import (
+ "context"
+
"github.com/chrislusf/seaweedfs/weed/glog"
"github.com/chrislusf/seaweedfs/weed/pb/filer_pb"
"github.com/chrislusf/seaweedfs/weed/util"
@@ -114,8 +116,13 @@ 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
if wfs.option.AsyncMetaDataCaching {
-
+ cachedEntry, cacheErr := wfs.metaCache.FindEntry(context.Background(), fullpath)
+ if cacheErr == filer_pb.ErrNotFound {
+ return nil, fuse.ENOENT
+ }
+ return cachedEntry.ToProtoEntry(), nil
}
err = wfs.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {