Commit d339218a authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Move GetPath to pathfilesystem.go, so all locking is within one file.

parent 85a39adf
......@@ -468,3 +468,14 @@ func (me *FileSystemConnector) Unmount(path string) Status {
}
return unmountError
}
func (me *FileSystemConnector) GetPath(nodeid uint64) (path string, mount *mountData, node *inode) {
n := me.getInodeData(nodeid)
// Need to lock because renames create invalid states.
me.treeLock.RLock()
defer me.treeLock.RUnlock()
p, m := n.GetPath()
return p, m, n
}
......@@ -23,17 +23,6 @@ func (me *FileSystemConnector) SetOptions(opts FileSystemConnectorOptions) {
me.options = opts
}
func (me *FileSystemConnector) GetPath(nodeid uint64) (path string, mount *mountData, node *inode) {
n := me.getInodeData(nodeid)
// Need to lock because renames create invalid states.
me.treeLock.RLock()
defer me.treeLock.RUnlock()
p, m := n.GetPath()
return p, m, n
}
func (me *FileSystemConnector) Init(h *InHeader, input *InitIn) (*InitOut, Status) {
// TODO ?
return &InitOut{}, OK
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment