From 64a5bab8568aeec8b7c718df8f45bf1003f8e451 Mon Sep 17 00:00:00 2001 From: Brian Cox Date: Wed, 25 May 2016 12:14:55 -0700 Subject: [PATCH] Use both POSIX_FADV_SEQUENTIAL & POSIX_FADV_NOREUSE when scanning (if available) since they aren't mutually exclusive. --- src/core/file_unix.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/file_unix.cpp b/src/core/file_unix.cpp index a743d0e..8d60a2e 100644 --- a/src/core/file_unix.cpp +++ b/src/core/file_unix.cpp @@ -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 }