Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

maintain node lookup counter

chrislu40089b6753b7
diff --git a/weed/mount/inode_to_path.go b/weed/mount/inode_to_path.go
index dd125f2502..0c34b2ab4c 100644
--- a/weed/mount/inode_to_path.go
+++ b/weed/mount/inode_to_path.go
@@ -38,6 +38,7 @@ func (ie *InodeEntry) removeOnePath(p util.FullPath) bool {
ie.paths[x] = ie.paths[x+1]
}
ie.paths = ie.paths[0 : len(ie.paths)-1]
+ ie.nlookup--
return true
}
@@ -171,6 +172,7 @@ func (i *InodeToPath) AddPath(inode uint64, path util.FullPath) {
ie, found := i.inode2path[inode]
if found {
ie.paths = append(ie.paths, path)
+ ie.nlookup++
} else {
i.inode2path[inode] = &InodeEntry{
paths: []util.FullPath{path},