aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/meta_cache
diff options
context:
space:
mode:
Diffstat (limited to 'weed/mount/meta_cache')
-rw-r--r--weed/mount/meta_cache/meta_cache_init.go17
1 files changed, 4 insertions, 13 deletions
diff --git a/weed/mount/meta_cache/meta_cache_init.go b/weed/mount/meta_cache/meta_cache_init.go
index 4ef1757d1..f360f1f2b 100644
--- a/weed/mount/meta_cache/meta_cache_init.go
+++ b/weed/mount/meta_cache/meta_cache_init.go
@@ -10,7 +10,7 @@ import (
"github.com/chrislusf/seaweedfs/weed/util"
)
-func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.FullPath, entryChan chan *filer.Entry) error {
+func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.FullPath) error {
currentPath := dirPath
@@ -22,14 +22,8 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full
return nil
}
- if entryChan != nil && dirPath == currentPath {
- if err := doEnsureVisited(mc, client, currentPath, entryChan); err != nil {
- return err
- }
- } else {
- if err := doEnsureVisited(mc, client, currentPath, nil); err != nil {
- return err
- }
+ if err := doEnsureVisited(mc, client, currentPath); err != nil {
+ return err
}
// continue to parent directory
@@ -45,7 +39,7 @@ func EnsureVisited(mc *MetaCache, client filer_pb.FilerClient, dirPath util.Full
}
-func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullPath, entryChan chan *filer.Entry) error {
+func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullPath) error {
glog.V(4).Infof("ReadDirAllEntries %s ...", path)
@@ -59,9 +53,6 @@ func doEnsureVisited(mc *MetaCache, client filer_pb.FilerClient, path util.FullP
glog.V(0).Infof("read %s: %v", entry.FullPath, err)
return err
}
- if entryChan != nil {
- entryChan <- entry
- }
return nil
})
})