Ticket #1418 (new defect)

Opened 10 months ago

posix_fadvise missfunctions

Reported by: fantec@… Owned by: jan
Priority: normal Milestone: 1.5.0
Component: core Version: 1.4.18
Severity: normal Keywords:
Cc: Blocked By:
Need User Feedback: no Blocking:

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

Attachments

lighttpd-1.4.18-fadvise.patch (2.8 kB) - added by fantec@… 10 months ago.

Change History

Changed 10 months ago by fantec@…

Add/Change #1418 (posix_fadvise missfunctions)

Author



Change Properties
<Author field>
Action
as new
 
Note: See TracTickets for help on using tickets.