#include <XrdOssWrapper.hh>
Public Member Functions | |
| XrdOssWrapDF (XrdOssDF &df2Wrap) | |
| virtual | ~XrdOssWrapDF () |
| virtual int | Clone (const std::vector< XrdOucCloneSeg > &cVec) |
| virtual int | Clone (XrdOssDF &srcFile) |
| virtual int | Close (long long *retsz=0) |
| uint16_t | DFType () |
| virtual int | Fchmod (mode_t mode) |
| virtual int | Fctl (int cmd, int alen, const char *args, char **resp=0) |
| virtual void | Flush () |
| Flush filesystem cached pages for this file (used for checksums). | |
| virtual int | Fstat (struct stat *buf) |
| virtual int | Fsync () |
| virtual int | Fsync (XrdSfsAio *aiop) |
| virtual int | Ftruncate (unsigned long long flen) |
| virtual bool | getErrMsg (std::string &eText) |
| virtual int | getFD () |
| virtual off_t | getMmap (void **addr) |
| virtual const char * | getTID () |
| virtual int | isCompressed (char *cxidp=0) |
| virtual int | Open (const char *path, int Oflag, mode_t Mode, XrdOucEnv &env) |
| virtual int | Opendir (const char *path, XrdOucEnv &env) |
| virtual ssize_t | pgRead (void *buffer, off_t offset, size_t rdlen, uint32_t *csvec, uint64_t opts) |
| virtual int | pgRead (XrdSfsAio *aioparm, uint64_t opts) |
| virtual ssize_t | pgWrite (void *buffer, off_t offset, size_t wrlen, uint32_t *csvec, uint64_t opts) |
| virtual int | pgWrite (XrdSfsAio *aioparm, uint64_t opts) |
| virtual ssize_t | Read (off_t offset, size_t size) |
| virtual ssize_t | Read (void *buffer, off_t offset, size_t size) |
| virtual ssize_t | Read (XrdOucRangeList &rlist) |
| virtual int | Read (XrdSfsAio *aiop) |
| virtual int | Readdir (char *buff, int blen) |
| virtual ssize_t | ReadRaw (void *buffer, off_t offset, size_t size) |
| virtual ssize_t | ReadV (XrdOucIOVec *readV, int rdvcnt) |
| virtual int | StatRet (struct stat *Stat) |
| virtual ssize_t | Write (const void *buffer, off_t offset, size_t size) |
| virtual int | Write (XrdSfsAio *aiop) |
| virtual ssize_t | WriteV (XrdOucIOVec *writeV, int wrvcnt) |
| Public Member Functions inherited from XrdOssDF | |
| XrdOssDF (const char *tid="", uint16_t dftype=0, int fdnum=-1) | |
| virtual | ~XrdOssDF () |
| uint16_t | DFType () |
Protected Attributes | |
| XrdOssDF & | wrapDF |
| Protected Attributes inherited from XrdOssDF | |
| uint16_t | dfType |
| int | fd |
| off_t | pgwEOF |
| short | rsvd |
| const char * | tident |
Additional Inherited Members | |
| Static Public Attributes inherited from XrdOssDF | |
| static const uint16_t | DF_isDir = 0x0001 |
| Object is for a directory. | |
| static const uint16_t | DF_isFile = 0x0002 |
| Object is for a file. | |
| static const uint16_t | DF_isProxy = 0x0010 |
| Object is a proxy object. | |
| static const uint64_t | doCalc = 0x4000000000000000ULL |
| pgw: Calculate checksums | |
| static const int | Fctl_ckpObj = 0 |
| static const int | Fctl_QFinfo = 3 |
| static const int | Fctl_setFD = 2 |
| static const int | Fctl_utimes = 1 |
| static const uint64_t | Verify = 0x8000000000000000ULL |
| all: Verify checksums | |
This class defines a wrapper around the three basic XrdOss classes that defines the Oss interface. It is meant to be used by pushed XrdOss plugins that wish to intercept certain XrdOss method for an underlying Oss plugin. Inheriting this class and providing it the underlying wrapped object allows the derived class to easily intercept certain methods while allow non-intercepted methods to pass through.
This class wraps the object that handles directory as well as file oriented requests. It is used by the derived class to wrap the object obtained by calling newDir() or newFile() in class XrdOss.
Definition at line 52 of file XrdOssWrapper.hh.
|
inline |
Constructor and Destructor
| df2Wrap- | Reference to the newFile or newDir object being wrapped. |
Definition at line 485 of file XrdOssWrapper.hh.
References XrdOssDF::XrdOssDF(), and wrapDF.
Referenced by XrdOssStats::Directory::Directory(), XrdOssStats::File::File(), XrdOssArcDir::XrdOssArcDir(), and XrdOssArcFile::XrdOssArcFile().
|
inlinevirtual |
Definition at line 487 of file XrdOssWrapper.hh.
|
inlinevirtual |
Clone contents of a file from one or more oher files.
| cVec | - A vector of struct XrdOucCloneSeg describing the action. |
Reimplemented from XrdOssDF.
Definition at line 122 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Clone contents of a file from another file.
| srcFile | - Reference to the file to used to clone contents of this file. |
Reimplemented from XrdOssDF.
Definition at line 112 of file XrdOssWrapper.hh.
References XrdOssDF::XrdOssDF(), and wrapDF.
|
inlinevirtual |
Close a directory or file.
| retsz | If not nil, where the size of the file is to be returned. |
Implements XrdOssDF.
Reimplemented in XrdOssArcDir, and XrdOssArcFile.
Definition at line 412 of file XrdOssWrapper.hh.
References wrapDF.
|
inline |
Return the underlying object type.
Definition at line 420 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Change file mode settings.
| mode | - The new file mode setting. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 133 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Execute a special operation on the directory or file.
| cmd | - The operation to be performed: Fctl_ckpObj - Obtain checkpoint object for proxy file. Argument: None. Response: Pointer to XrdOucChkPnt object. Fctl_utimes - Set atime and mtime (no response). Argument: struct timeval tv[2] Fctl_setFD - Set file descriptor for unopened file. Argument: pointer to int file descriptor |
| alen | - Length of data pointed to by args. |
| alen | - Length of data pointed to by args. |
| args | - Data sent with request, zero if alen is zero. |
| resp | - Where the response is to be set. The caller must call delete on the returned object. |
Reimplemented from XrdOssDF.
Definition at line 442 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Flush filesystem cached pages for this file (used for checksums).
Reimplemented from XrdOssDF.
Definition at line 139 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Return state information for this file.
| buf | - Pointer to the structure where info it to be returned. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcFile, and XrdOssStats::File.
Definition at line 149 of file XrdOssWrapper.hh.
|
inlinevirtual |
Synchronize associated file with media (synchronous).
Reimplemented from XrdOssDF.
Definition at line 157 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Synchronize associated file with media (asynchronous).
| aiop | - Pointer to async I/O request object. |
Reimplemented from XrdOssDF.
Definition at line 167 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Set the size of the associated file.
| flen | - The new size of the file. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 177 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Obtain detailed error message text for the immediately preceeding directory or file error (see also XrdOssWrapper::getErrMsg()).
| eText | - Where the message text is to be returned. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcDir, and XrdOssArcFile.
Definition at line 458 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Return the underlying file descriptor.
Reimplemented from XrdOssDF.
Definition at line 466 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Return the memory mapped characteristics of the file.
| addr | - Pointer to where the memory mapped address is to be returned. |
Reimplemented from XrdOssDF.
Definition at line 190 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Return trace identifier associated with this object.
Reimplemented from XrdOssDF.
Definition at line 474 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Return file compression charectistics.
| cxidp | - Pointer to where the compression algorithm name returned. |
Reimplemented from XrdOssDF.
Definition at line 201 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Open a file.
| path | - Pointer to the path of the file to be opened. |
| Oflag | - Standard open flags. |
| Mode | - File open mode (ignored unless creating a file). |
| env | - Reference to environmental information. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcFile, and XrdOssStats::File.
Definition at line 214 of file XrdOssWrapper.hh.
|
inlinevirtual |
Open a directory.
| path | - Pointer to the path of the directory to be opened. |
| env | - Reference to environmental information. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcDir, and XrdOssStats::Directory.
Definition at line 69 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Read file pages into a buffer and return corresponding checksums.
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. It must be page aligned. |
| rdlen | - The number of bytes to read. The amount must be an integral number of XrdSfsPage::Size bytes. |
| csvec | - A vector of entries to be filled with the cooresponding CRC32C checksum for each page. It must be size to rdlen/XrdSys::PageSize + (rdlenXrdSys::PageSize != 0) |
| opts | - Processing options (see below). |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 234 of file XrdOssWrapper.hh.
|
inlinevirtual |
Read file pages and checksums using asynchronous I/O.
| aioparm | - Pointer to async I/O object controlling the I/O. |
| opts | - Processing options (see above). |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 248 of file XrdOssWrapper.hh.
|
inlinevirtual |
Write file pages into a file with corresponding checksums.
| buffer | - pointer to buffer containing the bytes to write. |
| offset | - The offset where the write is to start. It must be page aligned. |
| wrlen | - The number of bytes to write. If amount is not an integral number of XrdSys::PageSize bytes, then this must be the last write to the file at or above the offset. |
| csvec | - A vector which contains the corresponding CRC32 checksum for each page. It must be size to wrlen/XrdSys::PageSize + (wrlenXrdSys::PageSize != 0) |
| opts | - Processing options (see above). |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 270 of file XrdOssWrapper.hh.
|
inlinevirtual |
Write file pages and checksums using asynchronous I/O.
| aioparm | - Pointer to async I/O object controlling the I/O. |
| opts | - Processing options (see above). |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 284 of file XrdOssWrapper.hh.
|
inlinevirtual |
Preread file blocks into the file system cache.
| offset | - The offset where the read is to start. |
| size | - The number of bytes to pre-read. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcFile, and XrdOssStats::File.
Definition at line 296 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Read file bytes into a buffer.
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. |
| size | - The number of bytes to read. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcFile, and XrdOssStats::File.
Definition at line 322 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Preread a list of file blocks into the file system cache.
| rlist | - A list of byte ranges to pre-read. |
Reimplemented from XrdOssDF.
Definition at line 308 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Read file bytes using asynchronous I/O.
| aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 334 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Get the next directory entry.
| buff | - Pointer to buffer where a null terminated string of the entry name is to be returned. If no more entries exist, a null string is returned. |
| blen | - Length of the buffer. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::Directory.
Definition at line 83 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Read uncompressed file bytes into a buffer.
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. |
| size | - The number of bytes to read. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 347 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Read file bytes as directed by the read vector.
| readV | pointer to the array of read requests. |
| rdvcnt | the number of elements in readV. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 360 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Set the stat() buffer where stat information is to be placed corresponding to the directory entry returned by Readdir().
| Stat | - Pointer to stat structure to be used. |
Reimplemented from XrdOssDF.
Definition at line 97 of file XrdOssWrapper.hh.
|
inlinevirtual |
Write file bytes from a buffer.
| buffer | - pointer to buffer where the bytes reside. |
| offset | - The offset where the write is to start. |
| size | - The number of bytes to write. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssArcFile, and XrdOssStats::File.
Definition at line 374 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Write file bytes using asynchronous I/O.
| aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 386 of file XrdOssWrapper.hh.
References wrapDF.
|
inlinevirtual |
Write file bytes as directed by the write vector.
| writeV | pointer to the array of write requests. |
| wrvcnt | the number of elements in writeV. |
Reimplemented from XrdOssDF.
Reimplemented in XrdOssStats::File.
Definition at line 398 of file XrdOssWrapper.hh.
References wrapDF.
|
protected |
Definition at line 492 of file XrdOssWrapper.hh.
Referenced by XrdOssStats::File::File(), XrdOssWrapDF(), Clone(), Clone(), Close(), DFType(), XrdOssStats::File::Fchmod(), Fchmod(), Fctl(), Flush(), XrdOssStats::File::Fstat(), Fstat(), Fsync(), Fsync(), XrdOssStats::File::Ftruncate(), Ftruncate(), getErrMsg(), getFD(), getMmap(), getTID(), isCompressed(), XrdOssStats::File::Open(), Open(), XrdOssStats::Directory::Opendir(), Opendir(), XrdOssStats::File::pgRead(), XrdOssStats::File::pgRead(), pgRead(), pgRead(), XrdOssStats::File::pgWrite(), XrdOssStats::File::pgWrite(), pgWrite(), pgWrite(), XrdOssStats::File::Read(), XrdOssStats::File::Read(), XrdOssStats::File::Read(), Read(), Read(), Read(), Read(), XrdOssStats::Directory::Readdir(), Readdir(), XrdOssStats::File::ReadRaw(), ReadRaw(), XrdOssStats::File::ReadV(), ReadV(), StatRet(), XrdOssStats::File::Write(), XrdOssStats::File::Write(), Write(), Write(), XrdOssStats::File::WriteV(), and WriteV().