Skip to content

Commit

Permalink
Removed failed prefetched block in ProcessRequest().
Browse files Browse the repository at this point in the history
  • Loading branch information
alja authored and osschar committed Mar 9, 2016
1 parent cc8cdcf commit f4e8a0b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/XrdFileCache/XrdFileCacheFile.cc
Expand Up @@ -736,11 +736,6 @@ void File::ProcessBlockResponse(Block* b, XrdCl::XRootDStatus *status)
inc_ref_count(b);
cache()->AddWriteTask(b, true);
}
else {
if (b->m_prefetch && ( b->m_refcnt == 0)) {
m_block_map.erase((int)(b->m_offset/BufferSize()));
}
}
}
else
{
Expand All @@ -752,10 +747,18 @@ void File::ProcessBlockResponse(Block* b, XrdCl::XRootDStatus *status)
b->set_error_and_free(errno);
errno = 0;

// ??? AMT temprary commented out
// ??? AMT temprary commented out -- throw away failed attempts
// inc_ref_count(b);
}


// case when there is a prefetch that is failed or prefetch that stopped has just been initated
if (b->m_refcnt == 0) {
assert(b->m_prefetch);
m_block_map.erase((int)(b->m_offset/BufferSize()));
}


m_downloadCond.Broadcast();

m_downloadCond.UnLock();
Expand Down

0 comments on commit f4e8a0b

Please sign in to comment.