(trunk libT) #2551 "when uploading to peers, prefetch local data from disk" -- commit jch patch #2, which prefetches before checksumming an individual piece

This commit is contained in:
Charles Kerr 2010-04-30 00:04:15 +00:00
parent 6643f98346
commit 7da3b81cda
1 changed files with 2 additions and 0 deletions

View File

@ -308,6 +308,8 @@ recalculateHash( tr_torrent * tor,
SHA1_Init( &sha );
bytesLeft = tr_torPieceCountBytes( tor, pieceIndex );
tr_ioPrefetch( tor, pieceIndex, offset, bytesLeft );
while( bytesLeft )
{
const int len = MIN( bytesLeft, buflen );