1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00

(trunk libT) remove some of the lazy-verify debug messages.

This commit is contained in:
Charles Kerr 2010-12-21 23:09:26 +00:00
parent e8c2f6cf15
commit 6b7babde5c
2 changed files with 6 additions and 14 deletions

View file

@ -2366,25 +2366,18 @@ tr_torrentPieceNeedsCheck( const tr_torrent * tor, tr_piece_index_t p )
const tr_info * inf = tr_torrentInfo( tor );
/* if we've never checked this piece, then it needs to be checked */
if( !inf->pieces[p].timeChecked ) {
tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because it's never been tested", (size_t)p );
if( !inf->pieces[p].timeChecked )
return TRUE;
}
/* If we think we've completed one of the files in this piece,
* but it's been modified since we last checked it,
* then it needs to be rechecked */
tr_ioFindFileLocation( tor, p, 0, &f, &unused );
for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f ) {
if( tr_cpFileIsComplete( &tor->completion, f ) ) {
if( getFileMTime( tor, f ) > inf->pieces[p].timeChecked ) {
tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because file %zu mtime is newer than check time %zu", (size_t)p, (size_t)f, (size_t)inf->pieces[p].timeChecked );
for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f )
if( tr_cpFileIsComplete( &tor->completion, f ) )
if( getFileMTime( tor, f ) > inf->pieces[p].timeChecked )
return TRUE;
}
}
}
tr_tordbg( tor, "[LAZY] piece %zu does not need to be tested", (size_t)p );
return FALSE;
}

View file

@ -55,7 +55,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
SHA1_Init( &sha );
tr_tordbg( tor, "%s", "[LAZY] verifying torrent..." );
tr_tordbg( tor, "%s", "verifying torrent..." );
tr_torrentSetChecked( tor, 0 );
while( !*stopFlag && ( pieceIndex < tor->info.pieceCount ) )
{
@ -139,7 +139,6 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
filePos = 0;
}
}
tr_tordbg( tor, "%s", "[LAZY] DONE verifying torrent..." );
/* cleanup */
if( fd >= 0 )
@ -148,7 +147,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
/* stopwatch */
end = tr_time( );
tr_tordbg( tor, "it took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
tr_tordbg( tor, "Verification is done. It took %d seconds to verify %"PRIu64" bytes (%"PRIu64" bytes per second)",
(int)(end-begin), tor->info.totalSize,
(uint64_t)(tor->info.totalSize/(1+(end-begin))) );