From 7119e7b4912008f50c78639d393c95ee4eaea9e8 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Mon, 18 Jan 2021 01:14:42 -0800 Subject: [PATCH] mount: ensure reading from dirty pages --- weed/filesys/filehandle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go index c273eec8a..d5f6cc38e 100644 --- a/weed/filesys/filehandle.go +++ b/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) - if err == nil { + if err == nil || err == io.EOF { maxStop := fh.readFromDirtyPages(buff, req.Offset) totalRead = max(maxStop-req.Offset, totalRead) }