![]() |
XRootD
|
#include <XrdPfcFile.hh>
Public Member Functions | |
~File () | |
Destructor. More... | |
void | AddIO (IO *io) |
void | BlockRemovedFromWriteQ (Block *) |
Handle removal of a block from Cache's write queue. More... | |
void | BlocksRemovedFromWriteQ (std::list< Block * > &) |
Handle removal of a set of blocks from Cache's write queue. More... | |
int | dec_ref_cnt () |
bool | FinalizeSyncBeforeExit () |
Returns true if any of blocks need sync. Called from Cache::dec_ref_cnt on zero ref cnt. More... | |
int | get_ref_cnt () |
size_t | GetAccessCnt () const |
int | GetBlockSize () const |
long long | GetFileSize () const |
const Info::AStat * | GetLastAccessStats () const |
const std::string & | GetLocalPath () const |
XrdSysError * | GetLog () |
int | GetNBlocks () const |
int | GetNDownloadedBlocks () const |
int | GetPrefetchCountOnIO (IO *io) |
float | GetPrefetchScore () const |
std::string | GetRemoteLocations () const |
XrdSysTrace * | GetTrace () |
int | inc_ref_cnt () |
void | initiate_emergency_shutdown () |
bool | ioActive (IO *io) |
Initiate close. Return true if still IO active. Used in XrdPosixXrootd::Close() More... | |
void | ioUpdated (IO *io) |
Notification from IO that it has been updated (remote open). More... | |
bool | is_in_emergency_shutdown () |
const char * | lPath () const |
Log path. More... | |
void | Prefetch () |
int | Read (IO *io, char *buff, long long offset, int size, ReadReqRH *rh) |
Normal read. More... | |
int | ReadV (IO *io, const XrdOucIOVec *readV, int readVnum, ReadReqRH *rh) |
Vector read. More... | |
const Stats & | RefStats () const |
void | RemoveIO (IO *io) |
void | RequestSyncOfDetachStats () |
Flags that detach stats should be written out in final sync. Called from CacheIO upon Detach. More... | |
void | StopPrefetchingOnIO (IO *io) |
void | Sync () |
Sync file cache inf o and output data with disk. More... | |
void | WriteBlockToDisk (Block *b) |
Static Public Member Functions | |
static File * | FileOpen (const std::string &path, long long offset, long long fileSize) |
Static constructor that also does Open. Returns null ptr if Open fails. More... | |
Friends | |
class | BlockResponseHandler |
class | DirectResponseHandler |
Definition at line 207 of file XrdPfcFile.hh.
File::~File | ( | ) |
Destructor.
Definition at line 79 of file XrdPfcFile.cc.
References XrdOssDF::Close(), Macaroons::Debug, XrdPfc::ResourceMonitor::register_file_close(), XrdPfc::Cache::ResMon(), and TRACEF.
void File::AddIO | ( | IO * | io | ) |
Definition at line 310 of file XrdPfcFile.cc.
References Macaroons::Debug, Macaroons::Error, XrdPfc::IO::GetLocation(), XrdPfc::Stats::IoAttach(), XrdSysCondVar::Lock(), TRACEF, and XrdSysCondVar::UnLock().
Referenced by XrdPfc::Cache::GetFile().
void File::BlockRemovedFromWriteQ | ( | Block * | b | ) |
Handle removal of a block from Cache's write queue.
Definition at line 172 of file XrdPfcFile.cc.
References XrdPfc::Block::m_offset, and TRACEF.
void File::BlocksRemovedFromWriteQ | ( | std::list< Block * > & | blocks | ) |
Handle removal of a set of blocks from Cache's write queue.
Definition at line 180 of file XrdPfcFile.cc.
References TRACEF.
Referenced by XrdPfc::Cache::RemoveWriteQEntriesFor().
|
inline |
Definition at line 292 of file XrdPfcFile.hh.
|
static |
Static constructor that also does Open. Returns null ptr if Open fails.
Definition at line 108 of file XrdPfcFile.cc.
Referenced by XrdPfc::Cache::GetFile().
bool File::FinalizeSyncBeforeExit | ( | ) |
Returns true if any of blocks need sync. Called from Cache::dec_ref_cnt on zero ref cnt.
Definition at line 286 of file XrdPfcFile.cc.
References Macaroons::Debug, TRACEF, and XrdPfc::Info::WriteIOStatDetach().
|
inline |
Definition at line 290 of file XrdPfcFile.hh.
|
inline |
Definition at line 283 of file XrdPfcFile.hh.
References XrdPfc::Info::GetAccessCnt().
|
inline |
Definition at line 284 of file XrdPfcFile.hh.
References XrdPfc::Info::GetBufferSize().
|
inline |
Definition at line 274 of file XrdPfcFile.hh.
Referenced by XrdPfc::IOFile::FSize().
|
inline |
Definition at line 282 of file XrdPfcFile.hh.
References XrdPfc::Info::GetLastAccessStats().
|
inline |
Definition at line 269 of file XrdPfcFile.hh.
Referenced by XrdPfc::Cache::AddWriteTask(), XrdPfc::Cache::ReleaseFile(), and WriteBlockToDisk().
XrdSysError * File::GetLog | ( | ) |
Definition at line 1563 of file XrdPfcFile.cc.
References XrdPfc::Cache::GetInstance(), and XrdPfc::Cache::GetLog().
Referenced by WriteBlockToDisk().
|
inline |
Definition at line 285 of file XrdPfcFile.hh.
References XrdPfc::Info::GetNBlocks().
|
inline |
Definition at line 286 of file XrdPfcFile.hh.
References XrdPfc::Info::GetNDownloadedBlocks().
int XrdPfc::File::GetPrefetchCountOnIO | ( | IO * | io | ) |
float File::GetPrefetchScore | ( | ) | const |
Definition at line 1558 of file XrdPfcFile.cc.
std::string File::GetRemoteLocations | ( | ) | const |
Definition at line 1582 of file XrdPfcFile.cc.
XrdSysTrace * File::GetTrace | ( | ) |
Definition at line 1568 of file XrdPfcFile.cc.
References XrdPfc::Cache::GetInstance(), and XrdPfc::Cache::GetTrace().
|
inline |
Definition at line 291 of file XrdPfcFile.hh.
void File::initiate_emergency_shutdown | ( | ) |
Definition at line 121 of file XrdPfcFile.cc.
Referenced by XrdPfc::Cache::UnlinkFile().
bool File::ioActive | ( | IO * | io | ) |
Initiate close. Return true if still IO active. Used in XrdPosixXrootd::Close()
Definition at line 203 of file XrdPfcFile.cc.
References Macaroons::Debug, Macaroons::Error, XrdPfc::IO::GetLocation(), XrdPfc::IO::m_active_read_reqs, TRACE, and TRACEF.
Referenced by XrdPfc::IOFile::ioActive().
void File::ioUpdated | ( | IO * | io | ) |
Notification from IO that it has been updated (remote open).
Definition at line 194 of file XrdPfcFile.cc.
References XrdPfc::IO::GetLocation().
Referenced by XrdPfc::IOFile::Update().
|
inline |
Definition at line 295 of file XrdPfcFile.hh.
const char * File::lPath | ( | ) | const |
Log path.
Definition at line 1470 of file XrdPfcFile.cc.
Referenced by XrdPfc::Cache::ProcessWriteTasks(), and XrdPfc::Cache::RemoveWriteQEntriesFor().
void File::Prefetch | ( | ) |
Definition at line 1485 of file XrdPfcFile.cc.
References Macaroons::Debug, Macaroons::Error, XrdPfc::Info::TestBitWritten(), TRACEF, and Warning.
Referenced by XrdPfc::Cache::Prefetch().
Normal read.
Definition at line 689 of file XrdPfcFile.cc.
References XrdPfc::Stats::AddBytesHit(), Xrd::hex1, XrdPfc::Info::IsComplete(), XrdSysCondVar::Lock(), XrdPfc::ReadReqRH::m_seq_id, XrdOssDF::Read(), TRACEF, and XrdSysCondVar::UnLock().
Referenced by XrdPfc::IOFileBlock::Read().
int File::ReadV | ( | IO * | io, |
const XrdOucIOVec * | readV, | ||
int | readVnum, | ||
ReadReqRH * | rh | ||
) |
Vector read.
Definition at line 726 of file XrdPfcFile.cc.
References XrdPfc::Stats::AddBytesHit(), XrdPfc::Info::IsComplete(), XrdSysCondVar::Lock(), XrdOssDF::ReadV(), TRACEF, and XrdSysCondVar::UnLock().
|
inline |
Definition at line 287 of file XrdPfcFile.hh.
void File::RemoveIO | ( | IO * | io | ) |
Definition at line 347 of file XrdPfcFile.cc.
References Macaroons::Debug, Macaroons::Error, XrdPfc::Stats::IoDetach(), XrdSysCondVar::Lock(), TRACEF, and XrdSysCondVar::UnLock().
Referenced by XrdPfc::Cache::ReleaseFile().
void File::RequestSyncOfDetachStats | ( | ) |
Flags that detach stats should be written out in final sync. Called from CacheIO upon Detach.
Definition at line 280 of file XrdPfcFile.cc.
Referenced by XrdPfc::IOFile::DetachFinalize().
void XrdPfc::File::StopPrefetchingOnIO | ( | IO * | io | ) |
void File::Sync | ( | ) |
Sync file cache inf o and output data with disk.
Definition at line 1091 of file XrdPfcFile.cc.
References Macaroons::Error, XrdOssDF::Fsync(), XrdPfc::Cache::GetInstance(), XrdPfc::Info::IsComplete(), XrdPfc::Info::SetBitSynced(), TRACEF, XrdPfc::Cache::UnlinkFile(), XrdPfc::Info::Write(), XrdPfc::Info::WriteIOStat(), and XrdOssOK.
void File::WriteBlockToDisk | ( | Block * | b | ) |
Definition at line 1008 of file XrdPfcFile.cc.
References XrdSysError::Emsg(), Macaroons::Error, XrdPfc::Block::get_buff(), XrdPfc::Block::get_size(), XrdPfc::Cache::GetInstance(), GetLocalPath(), GetLog(), XrdPfc::Block::has_cksums(), XrdPfc::Info::IsCkSumCache(), XrdPfc::Info::IsCkSumNet(), XrdPfc::Info::IsComplete(), XrdPfc::Configuration::m_flushCnt, XrdPfc::Block::m_offset, XrdPfc::Block::m_prefetch, XrdOssDF::pgWrite(), XrdPfc::Block::ref_cksum_vec(), XrdPfc::Cache::RefConfiguration(), XrdPfc::Block::req_cksum_net(), XrdPfc::Info::ResetCkSumNet(), XrdPfc::Info::SetBitPrefetch(), XrdPfc::Info::SetBitSynced(), XrdPfc::Info::SetBitWritten(), TRACEF, and XrdOssDF::Write().
Referenced by XrdPfc::Cache::ProcessWriteTasks().
|
friend |
Definition at line 209 of file XrdPfcFile.hh.
|
friend |
Definition at line 210 of file XrdPfcFile.hh.