Ticket #2551: 0002-Prefetch-when-verifying.patch

File 0002-Prefetch-when-verifying.patch, 745 bytes (added by jch, 11 years ago)
  • libtransmission/inout.c

    From b221f48c6dabe59bbbde0fe01dfc8649327ef836 Mon Sep 17 00:00:00 2001
    From: Juliusz Chroboczek <jch@pps.jussieu.fr>
    Date: Mon, 9 Nov 2009 06:53:28 +0100
    Subject: [PATCH 2/3] Prefetch when verifying.
    
    ---
     libtransmission/inout.c |    2 ++
     1 files changed, 2 insertions(+), 0 deletions(-)
    
    diff --git a/libtransmission/inout.c b/libtransmission/inout.c
    index 98fa2bb..d689e9b 100644
    a b recalculateHash( tr_torrent * tor, 
    315315    SHA1_Init( &sha );
    316316    bytesLeft = tr_torPieceCountBytes( tor, pieceIndex );
    317317
     318    tr_ioPrefetch( tor, pieceIndex, offset, bytesLeft );
     319
    318320    while( bytesLeft )
    319321    {
    320322        const int len = MIN( bytesLeft, buflen );