This commit is contained in:
Gaspare Iengo
2024-06-06 19:49:33 +00:00
committed by GitHub
parent d8da4bbaa7
commit fce8fc1e16
3 changed files with 29 additions and 6 deletions

View File

@@ -114,9 +114,9 @@ func (i *InodeToPath) AllocateInode(path util.FullPath, unixTime int64) uint64 {
return inode
}
func (i *InodeToPath) GetInode(path util.FullPath) uint64 {
func (i *InodeToPath) GetInode(path util.FullPath) (uint64, bool) {
if path == "/" {
return 1
return 1, true
}
i.Lock()
defer i.Unlock()
@@ -125,7 +125,7 @@ func (i *InodeToPath) GetInode(path util.FullPath) uint64 {
// glog.Fatalf("GetInode unknown inode for %s", path)
// this could be the parent for mount point
}
return inode
return inode, found
}
func (i *InodeToPath) GetPath(inode uint64) (util.FullPath, fuse.Status) {