aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filesys/file.go')
-rw-r--r--weed/filesys/file.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index e971aa2e0..48a024f20 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -140,7 +140,15 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f
}
}
}
+ // set the new chunks and reset entry cache
entry.Chunks = chunks
+ file.wfs.handlesLock.Lock()
+ existingHandle, found := file.wfs.handles[file.Id()]
+ file.wfs.handlesLock.Unlock()
+ if found {
+ existingHandle.entryViewCache = nil
+ }
+
}
entry.Attributes.Mtime = time.Now().Unix()
entry.Attributes.FileSize = req.Size