aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/file.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-24 19:01:58 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-24 19:01:58 -0800
commit00707ec00fb8016ac9ef8858a01a9784a6aee1a0 (patch)
treedfe313d9fead4bcdf741e52f7b6316d2da00d71b /weed/filesys/file.go
parent2c5eac5705c12b4dc0930d0a27478a73924b9e16 (diff)
downloadseaweedfs-00707ec00fb8016ac9ef8858a01a9784a6aee1a0.tar.xz
seaweedfs-00707ec00fb8016ac9ef8858a01a9784a6aee1a0.zip
mount: outsideContainerClusterMode proxy through filer
Running mount outside of the cluster would not need to expose all the volume servers to outside of the cluster. The chunk read and write will go through the filer.
Diffstat (limited to 'weed/filesys/file.go')
-rw-r--r--weed/filesys/file.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index a2b6660d8..a8d6dac29 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -147,9 +147,8 @@ func (file *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *f
}
}
file.entry.Chunks = chunks
- file.entryViewCache, _ = filer.NonOverlappingVisibleIntervals(filer.LookupFn(file.wfs), chunks)
+ file.entryViewCache, _ = filer.NonOverlappingVisibleIntervals(file.wfs.LookupFn(), chunks)
file.reader = nil
- file.wfs.deleteFileChunks(truncatedChunks)
}
file.entry.Attributes.FileSize = req.Size
file.dirtyMetadata = true
@@ -329,7 +328,7 @@ func (file *File) addChunks(chunks []*filer_pb.FileChunk) {
func (file *File) setEntry(entry *filer_pb.Entry) {
file.entry = entry
- file.entryViewCache, _ = filer.NonOverlappingVisibleIntervals(filer.LookupFn(file.wfs), entry.Chunks)
+ file.entryViewCache, _ = filer.NonOverlappingVisibleIntervals(file.wfs.LookupFn(), entry.Chunks)
file.reader = nil
}