Use both POSIX_FADV_SEQUENTIAL & POSIX_FADV_NOREUSE when scanning (if available) since they aren't mutually exclusive.
This commit is contained in:
parent
dbb7a57cdc
commit
64a5bab856
|
@ -222,8 +222,10 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_POSIX_FADVISE
|
#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_SEQUENTIAL);
|
||||||
|
posix_fadvise(fh,0,0, POSIX_FADV_NOREUSE);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue