Skip to content

Commit

Permalink
Remove Mark/UnMark prefech functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
alja committed Jun 9, 2016
1 parent ebff859 commit 9f8bd80
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/XrdFileCache/XrdFileCache.cc
Expand Up @@ -377,7 +377,7 @@ Cache::GetNextFileToPrefetch()
size_t l = m_prefetchList.size();
int idx = rand() % l;
File* f = m_prefetchList[idx];
f->MarkPrefetch();

m_prefetch_condVar.UnLock();
return f;
}
Expand Down
26 changes: 1 addition & 25 deletions src/XrdFileCache/XrdFileCacheFile.cc
Expand Up @@ -882,11 +882,7 @@ void File::Prefetch()
{
{
XrdSysCondVarHelper _lck(m_stateCond);
if (m_prefetchState == kComplete ) {
cache()->DeRegisterPrefetchFile(this);
return;
}
else if (m_prefetchState == kHold || m_prefetchState == kStopped)
if (m_prefetchState != kOn)
return;
}

Expand Down Expand Up @@ -920,8 +916,6 @@ void File::Prefetch()
m_stateCond.UnLock();
cache()->DeRegisterPrefetchFile(this);
}

UnMarkPrefetch();
}


Expand Down Expand Up @@ -951,24 +945,6 @@ float File::GetPrefetchScore() const
return m_prefetchScore;
}

//______________________________________________________________________________
void File::MarkPrefetch()
{
m_stateCond.Lock();
m_prefetchCurrentCnt++;
m_stateCond.UnLock();

}

//______________________________________________________________________________
void File::UnMarkPrefetch()
{
m_stateCond.Lock();
m_prefetchCurrentCnt--;
m_stateCond.UnLock();
}


XrdOucTrace* File::GetTrace()
{
return Cache::GetInstance().GetTrace();
Expand Down
4 changes: 0 additions & 4 deletions src/XrdFileCache/XrdFileCacheFile.hh
Expand Up @@ -184,8 +184,6 @@ namespace XrdFileCache

float GetPrefetchScore() const;

void MarkPrefetch();

//! Log path
const char* lPath() const;

Expand Down Expand Up @@ -223,8 +221,6 @@ namespace XrdFileCache
void CheckPrefetchStatRAM(Block* b);
void CheckPrefetchStatDisk(int idx);

void UnMarkPrefetch();

void inc_ref_count(Block*);
void dec_ref_count(Block*);
void free_block(Block*);
Expand Down

0 comments on commit 9f8bd80

Please sign in to comment.