Project

General

Profile

Actions

Bug #1418

closed

posix_fadvise missfunctions

Added by Anonymous almost 15 years ago. Updated about 6 years ago.

Status:
Obsolete
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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

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

Updated by gstrauss about 6 years ago

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

Updated by gstrauss about 6 years ago

  • Status changed from New to Obsolete
Actions

Also available in: Atom