Browse Source

mount: ensure reading from dirty pages

pull/1759/head
Chris Lu 4 years ago
parent
commit
7119e7b491
  1. 2
      weed/filesys/filehandle.go

2
weed/filesys/filehandle.go

@ -72,7 +72,7 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus
} }
totalRead, err := fh.readFromChunks(buff, req.Offset) totalRead, err := fh.readFromChunks(buff, req.Offset)
if err == nil {
if err == nil || err == io.EOF {
maxStop := fh.readFromDirtyPages(buff, req.Offset) maxStop := fh.readFromDirtyPages(buff, req.Offset)
totalRead = max(maxStop-req.Offset, totalRead) totalRead = max(maxStop-req.Offset, totalRead)
} }

Loading…
Cancel
Save