tr_torerr( tor, "read failed for \"%s\": %s",
file->name, tr_strerror( err ) );
}
- } else if( ioMode == TR_IO_PREFETCH ) {
- const int rc = tr_prefetch( fd, fileOffset, buflen );
- if( rc < 0 ) {
- /* (don't set "err" here... it's okay for prefetch to fail) */
- tr_tordbg( tor, "prefetch failed for \"%s\": %s",
- file->name, tr_strerror( errno ) );
- }
} else if( ioMode == TR_IO_WRITE ) {
const int rc = tr_pwrite( fd, buf, buflen, fileOffset );
if( rc < 0 ) {
tr_torerr( tor, "write failed for \"%s\": %s",
file->name, tr_strerror( err ) );
}
+ } else if( ioMode == TR_IO_PREFETCH ) {
+ tr_prefetch( fd, fileOffset, buflen );
} else {
abort();
}