Bug #1418
closedposix_fadvise missfunctions
Description
Hello,
there was a few problem about posix_fadvise in network_linux_sendfile :
- the sendfile may send more data than READ_AHEAD
- there was no fadvise(NOREUSE) before the first sendfile
- the fadvise was done on c->offset while the sendfile was done on offset (which is c->file.start + c->offset), so the fadvise was advising for a wrong part of the file
The attached patch is reducing the toSend value to the data previously advised (so the sendfile will not send more data), it is advising for the first chunk (when openning the file) and it tries to advise for the to-be-send chunk ;-)
It is still undef and needs special defines when compiled (I run gcc with -D_GNU_SOURCE for this specific file)
Fantec
-- fantec
Files
Updated by gstrauss over 8 years ago
- Description updated (diff)
- Assignee deleted (
jan) - Missing in 1.5.x set to Yes
Also available in: Atom