xrootd
|
#include <XrdPosixFile.hh>
Public Member Functions | |
long long | addOffset (long long offs, int updtSz=0) |
bool | Close (XrdCl::XRootDStatus &Status) |
bool | Detach (XrdOucCacheIOCD &cdP) override |
void | DetachDone () override |
Indicate that the CacheIO object has been detached. | |
bool | Finalize (XrdCl::XRootDStatus *Status) |
long long | FSize () override |
int | Fstat (struct stat &buf) override |
const char * | Location (bool refresh=false) override |
void | HandleResponse (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response) override |
void | updLock () |
void | updUnLock () |
long long | Offset () |
const char * | Origin () |
const char * | Path () override |
int | pgRead (char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override |
void | pgRead (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override |
int | pgWrite (char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override |
void | pgWrite (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0) override |
int | Read (char *Buff, long long Offs, int Len) override |
void | Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen) override |
int | ReadV (const XrdOucIOVec *readV, int n) override |
void | ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int n) override |
long long | setOffset (long long offs) |
bool | Stat (XrdCl::XRootDStatus &Status, bool force=false) |
int | Sync () override |
void | Sync (XrdOucCacheIOCB &iocb) override |
int | Trunc (long long Offset) override |
void | UpdtSize (size_t newsz) |
bool | Who (XrdPosixFile **fileP) override |
int | Write (char *Buff, long long Offs, int Len) override |
void | Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen) override |
XrdPosixFile (bool &aOK, const char *path, XrdPosixCallBack *cbP=0, int Opts=0) | |
~XrdPosixFile () | |
virtual bool | Who (XrdPosixDir **dirP) |
virtual bool | Who (XrdPosixFile **fileP) |
Public Member Functions inherited from XrdPosixObject | |
bool | AssignFD (bool isStream=false) |
int | FDNum () |
void | Lock (bool wr=true) |
void | Ref () |
int | Refs () |
void | unRef () |
void | UnLock () |
XrdPosixObject () | |
virtual | ~XrdPosixObject () |
Public Member Functions inherited from XrdOucCacheIO | |
virtual void | Preread (long long offs, int rlen, int opts=0) |
virtual void | Preread (aprParms &Parms) |
virtual void | Trunc (XrdOucCacheIOCB &iocb, long long offs) |
virtual void | Update (XrdOucCacheIO &iocp) |
virtual int | WriteV (const XrdOucIOVec *writV, int wnum) |
virtual void | WriteV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum) |
XrdOucCacheIO () | |
Construct and Destructor. | |
Public Member Functions inherited from XrdOucCacheIOCD | |
XrdOucCacheIOCD () | |
virtual | ~XrdOucCacheIOCD () |
Public Member Functions inherited from XrdCl::ResponseHandler | |
virtual | ~ResponseHandler () |
virtual void | HandleResponseWithHosts (XRootDStatus *status, AnyObject *response, HostList *hostList) |
Static Public Member Functions | |
static void * | DelayedDestroy (void *) |
static void | DelayedDestroy (XrdPosixFile *fp) |
Static Public Member Functions inherited from XrdPosixObject | |
static bool | CanStream () |
static XrdPosixDir * | Dir (int fildes, bool glk=false) |
static XrdPosixFile * | File (int fildes, bool glk=false) |
static int | Init (int numfd) |
static void | Release (XrdPosixObject *oP, bool needlk=true) |
static XrdPosixDir * | ReleaseDir (int fildes) |
static XrdPosixFile * | ReleaseFile (int fildes) |
static void | Shutdown () |
static bool | Valid (int fd) |
Static Public Member Functions inherited from XrdCl::ResponseHandler | |
static ResponseHandler * | Wrap (std::function< void(XRootDStatus &, AnyObject &)> func) |
static ResponseHandler * | Wrap (std::function< void(XRootDStatus *, AnyObject *)> func) |
Public Attributes | |
XrdOucCacheIO * | XCio |
XrdPosixPrepIO * | PrepIO |
XrdCl::File | clFile |
size_t | mySize |
time_t | myAtime |
time_t | myCtime |
time_t | myMtime |
dev_t | myRdev |
ino_t | myInode |
mode_t | myMode |
Static Public Attributes | |
static XrdSysSemaphore | ddSem |
static XrdSysMutex | ddMutex |
static XrdPosixFile * | ddList |
static XrdPosixFile * | ddLost |
static char * | sfSFX |
static short | sfSLN |
static bool | ddPosted |
static int | ddNum |
static const int | realFD = 1 |
static const int | isStrm = 2 |
static const int | isUpdt = 4 |
Static Public Attributes inherited from XrdOucCacheIO | |
static const uint64_t | forceCS = 0x0000000000000001ULL |
static const int | SingleUse = 0x0001 |
Mark pages for single use. | |
Private Attributes | ||
union { | ||
long long currOffset | ||
XrdPosixCallBack * theCB | ||
XrdPosixFile * nextFile | ||
}; | ||
char * | fPath | |
char * | fOpen | |
char * | fLoc | |
union { | ||
int cOpt | ||
int numTries | ||
}; | ||
char | isStream | |
Additional Inherited Members | |
Protected Member Functions inherited from XrdOucCacheIO | |
virtual | ~XrdOucCacheIO () |
Protected Attributes inherited from XrdPosixObject | |
XrdSysRecMutex | updMutex |
XrdSysRWLock | objMutex |
int | fdNum |
int | refCnt |
XrdPosixFile::XrdPosixFile | ( | bool & | aOK, |
const char * | path, | ||
XrdPosixCallBack * | cbP = 0 , |
||
int | Opts = 0 |
||
) |
XrdPosixFile::~XrdPosixFile | ( | ) |
|
inline |
References currOffset, XrdSysMutex::Lock(), mySize, XrdSysMutex::UnLock(), and XrdPosixObject::updMutex.
bool XrdPosixFile::Close | ( | XrdCl::XRootDStatus & | Status | ) |
|
static |
|
static |
|
inlineoverridevirtual |
Detach this CacheIO object from the cache.
iocd | reference to the detach complete callback object. |
Implements XrdOucCacheIO.
|
inlineoverridevirtual |
Indicate that the CacheIO object has been detached.
Implements XrdOucCacheIOCD.
References XrdPosixObject::unRef().
bool XrdPosixFile::Finalize | ( | XrdCl::XRootDStatus * | Status | ) |
|
inlineoverridevirtual |
Obtain size of the file.
Implements XrdOucCacheIO.
References AtomicBeg, AtomicEnd, AtomicGet, mySize, and XrdPosixObject::updMutex.
Referenced by XrdPosixPrepIO::FSize().
|
overridevirtual |
Perform an fstat() operation (defaults to passthrough).
sbuff | reference to the stat buffer to be filled in. Only fields st_size, st_blocks, st_mtime (st_atime and st_ctime may be set to st_mtime), st_ino, and st_mode need to be set. All other fields are preset and should not be changed. |
Reimplemented from XrdOucCacheIO.
Referenced by XrdPosixPrepIO::Fstat().
|
overridevirtual |
Called when a response to associated request arrives or an error occurs
status | status of the request |
response | an object associated with the response (request dependent) |
Reimplemented from XrdCl::ResponseHandler.
|
overridevirtual |
Get the file's location (i.e. endpoint hostname and port)
refresh | - when true, recomputes the location in case it changed st the location is cached from the previous successful call. |
Reimplemented from XrdOucCacheIO.
|
inline |
References AtomicRet, currOffset, and XrdPosixObject::updMutex.
|
inline |
References fOpen.
|
inlineoverridevirtual |
Get the path associated with this object.
Implements XrdOucCacheIO.
References fPath.
Referenced by XrdPosixPrepIO::Path().
|
overridevirtual |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Read file pages and checksums using asynchronous I/O (default sync).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
buff | pointer to buffer where the bytes are to be placed. |
offs | The offset where the read is to start. |
rdlen | The number of bytes to read. |
csvec | A vector which will be filled with the corresponding CRC32C checksum for each page or page segment. |
opts | Processing options: forceCS - always return checksums even when not available. |
csfix | When not nil, returns the number of corrected checksum errs. |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Write file pages from a buffer and corresponding verified checksums.
buff | pointer to buffer holding the bytes to be written. |
offs | The offset where the write is to start. |
wrlen | The number of bytes to write. offs+wrlen (i.e. it establishes an end of file). |
csvec | A vector of that holds the corresponding verified CRC32C checksum for each page or page segment. |
opts | Processing options. |
csfix | When not nil, returns the number of corrected checksum errs. |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Write file pages and checksums using asynchronous I/O (default sync).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
buff | pointer to buffer holding the bytes to be written. |
offs | The offset where the write is to start. |
wrlen | The number of bytes to write. |
csvec | A vector of that holds the corresponding verified CRC32C checksum for each page or page segment. |
opts | Processing options. |
csfix | When not nil, returns the number of corrected checksum errs. |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Perform an synchronous read.
buff | pointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
rlen | the number of bytes to read. |
Implements XrdOucCacheIO.
Referenced by XrdPosixPrepIO::Read(), and XrdPosixPrepIO::Read().
|
overridevirtual |
Perform an asynchronous read (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
buff | pointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
rlen | the number of bytes to read. |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Perform an synchronous vector read.
readV | pointer to a vector of read requests. |
rnum | the number of elements in the vector. |
Reimplemented from XrdOucCacheIO.
Referenced by XrdPosixPrepIO::ReadV(), and XrdPosixPrepIO::ReadV().
|
overridevirtual |
Perform an asynchronous vector read (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
readV | pointer to a vector of read requests. |
rnum | the number of elements in the vector. |
Reimplemented from XrdOucCacheIO.
|
inline |
References currOffset, XrdSysMutex::Lock(), XrdSysMutex::UnLock(), and XrdPosixObject::updMutex.
bool XrdPosixFile::Stat | ( | XrdCl::XRootDStatus & | Status, |
bool | force = false |
||
) |
|
overridevirtual |
Perform an synchronous sync() operation.
Implements XrdOucCacheIO.
Referenced by XrdPosixPrepIO::Sync(), and XrdPosixPrepIO::Sync().
|
overridevirtual |
Perform an asynchronous sync() operation (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
Reimplemented from XrdOucCacheIO.
|
overridevirtual |
Perform an synchronous trunc() operation.
offs | the size the file is have. |
Implements XrdOucCacheIO.
Referenced by XrdPosixPrepIO::Trunc().
|
inline |
References XrdSysMutex::Lock(), and XrdPosixObject::updMutex.
Referenced by XrdPosixObjGuard::Init().
|
inline |
References XrdSysMutex::Lock(), mySize, XrdSysMutex::UnLock(), and XrdPosixObject::updMutex.
|
inline |
References XrdSysMutex::UnLock(), and XrdPosixObject::updMutex.
Referenced by XrdPosixObjGuard::Init(), and XrdPosixObjGuard::Release().
|
inlinevirtual |
Reimplemented from XrdPosixObject.
|
inlinevirtual |
Reimplemented from XrdPosixObject.
|
inlineoverridevirtual |
Reimplemented from XrdPosixObject.
|
overridevirtual |
Perform an synchronous write.
buff | pointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
wlen | the number of bytes to write |
Implements XrdOucCacheIO.
Referenced by XrdPosixPrepIO::Write(), and XrdPosixPrepIO::Write().
|
overridevirtual |
Perform an asynchronous write (defaults to synchronous).
iocb | reference to the callback object that receives the result. All results are returned via this object's Done() method. If the caller holds any locks they must be recursive locks as the callback may occur on the calling thread. |
buff | pointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked. |
offs | the offset into the file. |
wlen | the number of bytes to write |
Reimplemented from XrdOucCacheIO.
union { ... } XrdPosixFile |
union { ... } XrdPosixFile |
XrdCl::File XrdPosixFile::clFile |
int XrdPosixFile::cOpt |
long long XrdPosixFile::currOffset |
Referenced by addOffset(), Offset(), and setOffset().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
private |
|
private |
Referenced by Origin().
|
private |
Referenced by Path().
|
private |
|
static |
|
static |
time_t XrdPosixFile::myAtime |
time_t XrdPosixFile::myCtime |
ino_t XrdPosixFile::myInode |
mode_t XrdPosixFile::myMode |
time_t XrdPosixFile::myMtime |
dev_t XrdPosixFile::myRdev |
size_t XrdPosixFile::mySize |
Referenced by addOffset(), FSize(), and UpdtSize().
XrdPosixFile* XrdPosixFile::nextFile |
int XrdPosixFile::numTries |
XrdPosixPrepIO* XrdPosixFile::PrepIO |
|
static |
|
static |
|
static |
XrdPosixCallBack* XrdPosixFile::theCB |
XrdOucCacheIO* XrdPosixFile::XCio |