]> granicus.if.org Git - transmission/commitdiff
(trunk libT) #2551 "when uploading to peers, prefetch local data from disk" -- commit...
authorCharles Kerr <charles@transmissionbt.com>
Fri, 30 Apr 2010 00:04:15 +0000 (00:04 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 30 Apr 2010 00:04:15 +0000 (00:04 +0000)
libtransmission/inout.c

index 3317b4195521552ecf70dfb3b16512e2c729894c..8ee6f2557d1951536d96ae8f0589ef3bf837f383 100644 (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 );