mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk libT) remove some of the lazy-verify debug messages.
This commit is contained in:
parent
e8c2f6cf15
commit
6b7babde5c
2 changed files with 6 additions and 14 deletions
|
@ -2366,25 +2366,18 @@ tr_torrentPieceNeedsCheck( const tr_torrent * tor, tr_piece_index_t p )
|
||||||
const tr_info * inf = tr_torrentInfo( tor );
|
const tr_info * inf = tr_torrentInfo( tor );
|
||||||
|
|
||||||
/* if we've never checked this piece, then it needs to be checked */
|
/* if we've never checked this piece, then it needs to be checked */
|
||||||
if( !inf->pieces[p].timeChecked ) {
|
if( !inf->pieces[p].timeChecked )
|
||||||
tr_tordbg( tor, "[LAZY] piece %zu needs to be tested because it's never been tested", (size_t)p );
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
|
|
||||||
/* If we think we've completed one of the files in this piece,
|
/* If we think we've completed one of the files in this piece,
|
||||||
* but it's been modified since we last checked it,
|
* but it's been modified since we last checked it,
|
||||||
* then it needs to be rechecked */
|
* then it needs to be rechecked */
|
||||||
tr_ioFindFileLocation( tor, p, 0, &f, &unused );
|
tr_ioFindFileLocation( tor, p, 0, &f, &unused );
|
||||||
for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f ) {
|
for( ; f < inf->fileCount && pieceHasFile( p, &inf->files[f] ); ++f )
|
||||||
if( tr_cpFileIsComplete( &tor->completion, f ) ) {
|
if( tr_cpFileIsComplete( &tor->completion, f ) )
|
||||||
if( getFileMTime( tor, f ) > inf->pieces[p].timeChecked ) {
|
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 );
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tr_tordbg( tor, "[LAZY] piece %zu does not need to be tested", (size_t)p );
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
||||||
|
|
||||||
SHA1_Init( &sha );
|
SHA1_Init( &sha );
|
||||||
|
|
||||||
tr_tordbg( tor, "%s", "[LAZY] verifying torrent..." );
|
tr_tordbg( tor, "%s", "verifying torrent..." );
|
||||||
tr_torrentSetChecked( tor, 0 );
|
tr_torrentSetChecked( tor, 0 );
|
||||||
while( !*stopFlag && ( pieceIndex < tor->info.pieceCount ) )
|
while( !*stopFlag && ( pieceIndex < tor->info.pieceCount ) )
|
||||||
{
|
{
|
||||||
|
@ -139,7 +139,6 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
||||||
filePos = 0;
|
filePos = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tr_tordbg( tor, "%s", "[LAZY] DONE verifying torrent..." );
|
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
if( fd >= 0 )
|
if( fd >= 0 )
|
||||||
|
@ -148,7 +147,7 @@ verifyTorrent( tr_torrent * tor, tr_bool * stopFlag )
|
||||||
|
|
||||||
/* stopwatch */
|
/* stopwatch */
|
||||||
end = tr_time( );
|
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,
|
(int)(end-begin), tor->info.totalSize,
|
||||||
(uint64_t)(tor->info.totalSize/(1+(end-begin))) );
|
(uint64_t)(tor->info.totalSize/(1+(end-begin))) );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue