mount2: invalidate fuse cache for replaced inode

This commit is contained in:
chrislu
2022-02-27 00:00:23 -08:00
parent 4ddcbaab57
commit 9ef5bb20f6
3 changed files with 14 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ type WFS struct {
inodeToPath *InodeToPath
fhmap *FileHandleToInode
dhmap *DirectoryHandleToInode
fuseServer *fuse.Server
}
func NewSeaweedFileSystem(option *Option) *WFS {
@@ -109,6 +110,10 @@ func (wfs *WFS) String() string {
return "seaweedfs"
}
func (wfs *WFS) Init(server *fuse.Server) {
wfs.fuseServer = server
}
func (wfs *WFS) maybeReadEntry(inode uint64) (path util.FullPath, fh *FileHandle, entry *filer_pb.Entry, status fuse.Status) {
path, status = wfs.inodeToPath.GetPath(inode)
if status != fuse.OK {