Use O_NOATIME while scanning (if available) to avoid updating file access times.
This commit is contained in:
parent
778c397d48
commit
0082db13fa
|
@ -133,7 +133,7 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags )
|
|||
Close();
|
||||
|
||||
//
|
||||
// set up the sopen permissions
|
||||
// set up the open permissions
|
||||
//
|
||||
int perm = 0;
|
||||
|
||||
|
@ -173,6 +173,11 @@ void cFile::Open( const TSTRING& sFileNameC, uint32 flags )
|
|||
perm |= O_NONBLOCK;
|
||||
#endif
|
||||
|
||||
#ifdef O_NOATIME
|
||||
if (flags & OPEN_SCANNING)
|
||||
perm |= O_NOATIME;
|
||||
#endif
|
||||
|
||||
#ifdef O_DIRECT
|
||||
//Only use O_DIRECT for scanning, since cfg/policy/report reads
|
||||
// don't happen w/ a nice round block size.
|
||||
|
|
Loading…
Reference in New Issue