mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
FUSE mount: clean up file handles during renaming
resolve dir rename when file is still open. Need to clean the file handles as soon as possible. These can happen out of order: file rename, then file release file release, then file rename
This commit is contained in:
parent
95a1860d65
commit
42a338d7b0
|
@ -42,6 +42,7 @@ func (dir *Dir) Rename(ctx context.Context, req *fuse.RenameRequest, newDirector
|
||||||
|
|
||||||
// fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
|
// fmt.Printf("rename path: %v => %v\n", oldPath, newPath)
|
||||||
dir.wfs.fsNodeCache.Move(oldPath, newPath)
|
dir.wfs.fsNodeCache.Move(oldPath, newPath)
|
||||||
|
delete(dir.wfs.handles, oldPath.AsInode())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue