Lines Matching refs:pieceIndex
157 tr_piece_index_t pieceIndex,
162 const uint64_t offset = tr_pieceOffset( tor, pieceIndex, pieceOffset, 0 );
186 tr_piece_index_t pieceIndex,
196 if( pieceIndex >= tor->info.pieceCount )
199 tr_ioFindFileLocation( tor, pieceIndex, pieceOffset,
226 tr_piece_index_t pieceIndex,
231 return readOrWritePiece( tor, TR_IO_READ, pieceIndex, begin, buf, len );
236 tr_piece_index_t pieceIndex,
240 return readOrWritePiece( tor, TR_IO_PREFETCH, pieceIndex, begin,
246 tr_piece_index_t pieceIndex,
251 return readOrWritePiece( tor, TR_IO_WRITE, pieceIndex, begin,
261 recalculateHash( tr_torrent * tor, tr_piece_index_t pieceIndex, uint8_t * setme )
271 assert( pieceIndex < tor->info.pieceCount );
277 bytesLeft = tr_torPieceCountBytes( tor, pieceIndex );
279 tr_ioPrefetch( tor, pieceIndex, offset, bytesLeft );
284 success = !tr_cacheReadBlock( tor->session->cache, tor, pieceIndex, offset, len, buffer );