aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/weedfs.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-02-27 00:00:23 -0800
committerchrislu <chris.lu@gmail.com>2022-02-27 00:00:23 -0800
commit9ef5bb20f6cea962e2e521f183c1d2fa692a4a2b (patch)
tree2126870523c9dd15078aebd4129e9dd56428daf9 /weed/mount/weedfs.go
parent4ddcbaab573be19ec5b78b7ff4a9ebcb9cd1f605 (diff)
downloadseaweedfs-9ef5bb20f6cea962e2e521f183c1d2fa692a4a2b.tar.xz
seaweedfs-9ef5bb20f6cea962e2e521f183c1d2fa692a4a2b.zip
mount2: invalidate fuse cache for replaced inode
Diffstat (limited to 'weed/mount/weedfs.go')
-rw-r--r--weed/mount/weedfs.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/mount/weedfs.go b/weed/mount/weedfs.go
index 1e6d1a856..157d385c7 100644
--- a/weed/mount/weedfs.go
+++ b/weed/mount/weedfs.go
@@ -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 {