Project

General

Profile

Bug #1418

posix_fadvise missfunctions

Added by Anonymous almost 12 years ago. Updated about 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

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

lighttpd-1.4.18-fadvise.patch (2.8 KB) lighttpd-1.4.18-fadvise.patch -- fantec Anonymous, 2007-10-26 13:59

History

#1

Updated by gstrauss about 3 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Missing in 1.5.x set to Yes
#2

Updated by gstrauss about 3 years ago

  • Status changed from New to Obsolete

Also available in: Atom