mount: add back support for filer.path

This commit is contained in:
chrislu
2022-02-28 12:16:53 -08:00
parent ca0cd81a75
commit fcf3714443
4 changed files with 17 additions and 12 deletions

View File

@@ -21,13 +21,13 @@ type InodeEntry struct {
isChildrenCached bool
}
func NewInodeToPath() *InodeToPath {
func NewInodeToPath(root util.FullPath) *InodeToPath {
t := &InodeToPath{
inode2path: make(map[uint64]*InodeEntry),
path2inode: make(map[util.FullPath]uint64),
}
t.inode2path[1] = &InodeEntry{"/", 1, true, false}
t.path2inode["/"] = 1
t.inode2path[1] = &InodeEntry{root, 1, true, false}
t.path2inode[root] = 1
return t
}