Use both POSIX_FADV_SEQUENTIAL & POSIX_FADV_NOREUSE when scanning (if available) since they aren't mutually exclusive.

This commit is contained in:
Brian Cox 2016-05-25 12:14:55 -07:00
parent dbb7a57cdc
commit 64a5bab856
1 changed files with 3 additions and 1 deletions

View File

@ -222,8 +222,10 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags )
#endif
#ifdef HAVE_POSIX_FADVISE
if (flags & OPEN_SCANNING)
if (flags & OPEN_SCANNING) {
posix_fadvise(fh,0,0, POSIX_FADV_SEQUENTIAL);
posix_fadvise(fh,0,0, POSIX_FADV_NOREUSE);
}
#endif
}