mirror of
https://github.com/transmission/transmission
synced 2025-03-15 16:29:34 +00:00
(trunk libT) try not to cache file data read in during verification
This commit is contained in:
parent
a942125d2f
commit
122d69d013
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,12 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
|||
pieceBytesRead += numRead;
|
||||
if( numRead == bytesThisPass )
|
||||
SHA1_Update( &sha, buffer, numRead );
|
||||
#ifdef HAVE_POSIX_FADVISE
|
||||
posix_fadvise( fd, filePos, bytesThisPass, POSIX_FADV_DONTNEED );
|
||||
#endif
|
||||
#ifdef SYS_DARWIN
|
||||
fcntl( fd, F_NOCACHE, 1 );
|
||||
#endif
|
||||
}
|
||||
|
||||
/* move our offsets */
|
||||
|
|
Loading…
Add table
Reference in a new issue