|
@ -68,14 +68,14 @@ func (fh *FileHandle) Read(ctx context.Context, req *fuse.ReadRequest, resp *fus |
|
|
totalRead = max(maxStop - req.Offset, totalRead) |
|
|
totalRead = max(maxStop - req.Offset, totalRead) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
totalRead = min(int64(len(buff)), totalRead) |
|
|
|
|
|
resp.Data = buff[:totalRead] |
|
|
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
if err != nil { |
|
|
glog.Errorf("file handle read %s: %v", fh.f.fullpath(), err) |
|
|
glog.Errorf("file handle read %s: %v", fh.f.fullpath(), err) |
|
|
return fuse.EIO |
|
|
return fuse.EIO |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
totalRead = min(int64(len(buff)), totalRead) |
|
|
|
|
|
resp.Data = buff[:totalRead] |
|
|
|
|
|
|
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|