aboutsummaryrefslogtreecommitdiff
path: root/weed/filesys/file.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-27 04:50:51 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-27 04:50:51 -0700
commitd1439c5bd3813ed6a4dfef6ab6671262b6f97386 (patch)
tree00e39713a68633e84a39fab95dcf8702f7ca5922 /weed/filesys/file.go
parentf06ca04451037bf4b250da55d408d06fc691c760 (diff)
downloadseaweedfs-d1439c5bd3813ed6a4dfef6ab6671262b6f97386.tar.xz
seaweedfs-d1439c5bd3813ed6a4dfef6ab6671262b6f97386.zip
fix FUSE read for large files
FUSE expects ReadAt do not return partial filled buffer with a nil error.
Diffstat (limited to 'weed/filesys/file.go')
-rw-r--r--weed/filesys/file.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/filesys/file.go b/weed/filesys/file.go
index 6f67081a6..7d64135b2 100644
--- a/weed/filesys/file.go
+++ b/weed/filesys/file.go
@@ -34,7 +34,7 @@ type File struct {
entry *filer_pb.Entry
entryViewCache []filer2.VisibleInterval
isOpen int
- reader io.ReadSeeker
+ reader io.ReaderAt
}
func (file *File) fullpath() util.FullPath {
@@ -249,6 +249,7 @@ func (file *File) addChunks(chunks []*filer_pb.FileChunk) {
file.entryViewCache = newVisibles
newVisibles = t
}
+
file.reader = nil
glog.V(3).Infof("%s existing %d chunks adds %d more", file.fullpath(), len(file.entry.Chunks), len(chunks))