aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-09-23 10:01:00 -0700
committerChris Lu <chris.lu@gmail.com>2018-09-23 10:01:00 -0700
commit578f8a6dec0e8c396221ae165ad3db18096ea957 (patch)
tree552a94d37bdeed257cf7c435e558e7f46d748011
parent200d9b9ac25efc81eae81218d5a7013b6204ac23 (diff)
downloadseaweedfs-578f8a6dec0e8c396221ae165ad3db18096ea957.tar.xz
seaweedfs-578f8a6dec0e8c396221ae165ad3db18096ea957.zip
fix empty file reading on linux
-rw-r--r--weed/filesys/filehandle.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/filesys/filehandle.go b/weed/filesys/filehandle.go
index e86238793..cc2c070eb 100644
--- a/weed/filesys/filehandle.go
+++ b/weed/filesys/filehandle.go
@@ -51,8 +51,8 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus
// this value should come from the filer instead of the old f
if len(fh.f.entry.Chunks) == 0 {
- glog.V(0).Infof("empty fh %v/%v", fh.f.dir.Path, fh.f.Name)
- return fmt.Errorf("empty file %v/%v", fh.f.dir.Path, fh.f.Name)
+ glog.V(1).Infof("empty fh %v/%v", fh.f.dir.Path, fh.f.Name)
+ return nil
}
buff := make([]byte, req.Size)