From 7da3b81cda8ad37ee2ea3aa59aa39cffd00f48e2 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 30 Apr 2010 00:04:15 +0000 Subject: [PATCH] (trunk libT) #2551 "when uploading to peers, prefetch local data from disk" -- commit jch patch #2, which prefetches before checksumming an individual piece --- libtransmission/inout.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libtransmission/inout.c b/libtransmission/inout.c index 3317b4195..8ee6f2557 100644 --- a/libtransmission/inout.c +++ b/libtransmission/inout.c @@ -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 ); -- 2.40.0