|
xrootd
|
#include <XrdOss.hh>

Public Member Functions | |
| virtual int | Opendir (const char *path, XrdOucEnv &env) |
| virtual int | Readdir (char *buff, int blen) |
| virtual int | StatRet (struct stat *buff) |
| virtual int | Fchmod (mode_t mode) |
| virtual void | Flush () |
| Flush filesystem cached pages for this file (used for checksums). More... | |
| virtual int | Fstat (struct stat *buf) |
| virtual int | Fsync () |
| virtual int | Fsync (XrdSfsAio *aiop) |
| virtual int | Ftruncate (unsigned long long flen) |
| virtual off_t | getMmap (void **addr) |
| virtual int | isCompressed (char *cxidp=0) |
| virtual int | Open (const char *path, int Oflag, mode_t Mode, 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 int | Read (XrdSfsAio *aiop) |
| virtual ssize_t | ReadRaw (void *buffer, off_t offset, size_t size) |
| virtual ssize_t | ReadV (XrdOucIOVec *readV, int rdvcnt) |
| 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) |
| virtual int | Close (long long *retsz=0)=0 |
| uint16_t | DFType () |
| virtual int | Fctl (int cmd, int alen, const char *args, char **resp=0) |
| virtual int | getFD () |
| virtual const char * | getTID () |
| XrdOssDF (const char *tid="", uint16_t dftype=0, int fdnum=-1) | |
| virtual | ~XrdOssDF () |
Static Public Attributes | |
| static const uint64_t | Verify = 0x8000000000000000ULL |
| all: Verify checksums More... | |
| static const uint64_t | doCalc = 0x4000000000000000ULL |
| pgw: Calculate checksums More... | |
| static const uint16_t | DF_isDir = 0x0001 |
| Object is for a directory. More... | |
| static const uint16_t | DF_isFile = 0x0002 |
| Object is for a file. More... | |
| static const uint16_t | DF_isProxy = 0x0010 |
| Object is a proxy object. More... | |
| static const int | Fctl_ckpObj = 0 |
| static const int | Fctl_utimes = 1 |
Protected Attributes | |
| const char * | tident |
| off_t | pgwEOF |
| int | fd |
| uint16_t | dfType |
| short | rsvd |
This class defines the object that handles directory as well as file oriented requests. It is instantiated for each file/dir to be opened. The object is obtained by calling newDir() or newFile() in class XrdOss. This allows flexibility on how to structure an oss plugin.
|
inline |
Constructor and Destructor
| tid | - Pointer to the trace identifier. |
| dftype | - The type of the object. |
| fdnum | - The value for the file descriptor. |
|
inlinevirtual |
|
pure virtual |
Close a directory or file.
| retsz | If not nil, where the size of the file is to be returned. |
Implemented in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, XrdCephOssDir, XrdCephOssFile, XrdOssDir, and XrdPssDir.
Referenced by XrdOssDFHandler::Close(), and XrdOssWrapDF::Close().
|
inline |
References dfType.
Referenced by XrdOssWrapDF::DFType().
|
inlinevirtual |
Change file mode settings.
| mode | - The new file mode setting. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdPssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Fchmod(), and XrdOssWrapDF::Fchmod().
|
virtual |
Reimplemented in XrdOssWrapDF, XrdOssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Fctl(), and XrdOssWrapDF::Fctl().
|
inlinevirtual |
Flush filesystem cached pages for this file (used for checksums).
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Flush(), and XrdOssWrapDF::Flush().
|
inlinevirtual |
Return state information for this file.
| buf | - Pointer to the structure where info it to be returned. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, XrdPssFile, XrdCephOssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Fstat(), and XrdOssWrapDF::Fstat().
|
inlinevirtual |
Synchronize associated file with media (synchronous).
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, XrdPssFile, XrdCephOssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Fsync(), and XrdOssWrapDF::Fsync().
|
inlinevirtual |
Synchronize associated file with media (asynchronous).
| aiop | - Pointer to async I/O request object. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, XrdPssFile, and XrdOssDFHandler.
|
inlinevirtual |
Set the size of the associated file.
| flen | - The new size of the file. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, XrdPssFile, XrdCephOssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Ftruncate(), and XrdOssWrapDF::Ftruncate().
|
inlinevirtual |
Return the underlying file descriptor.
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, XrdOssDir, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::getFD(), and XrdOssWrapDF::getFD().
|
inlinevirtual |
Return the memory mapped characteristics of the file.
| addr | - Pointer to where the memory mapped address is to be returned. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdOssCsiFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::getMmap(), and XrdOssWrapDF::getMmap().
|
inlinevirtual |
Return trace identifier associated with this object.
Reimplemented in XrdOssWrapDF, and XrdOssDFHandler.
References tident.
Referenced by XrdOssDFHandler::getTID(), and XrdOssWrapDF::getTID().
|
inlinevirtual |
Return file compression charectistics.
| cxidp | - Pointer to where the compression algorithm name returned. |
Reimplemented in XrdOssWrapDF, XrdOssFile, and XrdOssDFHandler.
References nlohmann::detail::void().
Referenced by XrdOssDFHandler::isCompressed(), and XrdOssWrapDF::isCompressed().
|
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdCephOssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Open(), and XrdOssWrapDF::Open().
|
inlinevirtual |
Open a directory.
| path | - Pointer to the path of the directory to be opened. |
| env | - Reference to environmental information. |
Reimplemented in XrdOssWrapDF, XrdOssCsiDir, XrdCephOssDir, XrdOssDir, XrdPssDir, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Opendir(), and XrdOssWrapDF::Opendir().
|
virtual |
Reimplemented in XrdOssWrapDF, XrdOssCsiFile, XrdPssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::pgRead(), and XrdOssWrapDF::pgRead().
|
virtual |
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 in XrdOssWrapDF, XrdOssCsiFile, XrdPssFile, and XrdOssDFHandler.
|
virtual |
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. |
| wrlen | - The number of bytes to write. |
| csvec | - A vector which contains the corresponding CRC32 checksum for each page. See XrdOucPgrwUtils::csNum() for sizing. |
| opts | - Processing options (see above). |
Reimplemented in XrdOssWrapDF, XrdOssCsiFile, XrdPssFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::pgWrite(), and XrdOssWrapDF::pgWrite().
|
virtual |
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 in XrdOssWrapDF, XrdOssCsiFile, XrdPssFile, and XrdOssDFHandler.
|
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
Referenced by XrdOssCsiFileAioJob::DoItRead1(), XrdOssCsiFileAioJob::DoItRead2(), XrdOssCsiTagstoreFile::fullread(), XrdOssCsiPages::maxread(), XrdOssDFHandler::Read(), and XrdOssWrapDF::Read().
|
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
|
inlinevirtual |
Read file bytes using asynchronous I/O.
| aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
References nlohmann::detail::void().
|
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 in XrdOssWrapDF, XrdOssCsiDir, XrdCephOssDir, XrdOssDir, XrdPssDir, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::Readdir(), and XrdOssWrapDF::Readdir().
|
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
Referenced by XrdOssDFHandler::ReadRaw(), and XrdOssWrapDF::ReadRaw().
|
virtual |
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::ReadV(), and XrdOssWrapDF::ReadV().
|
inlinevirtual |
Set the stat() buffer where stat information is to be placed corresponding to the directory entry returned by Readdir().
| buff | - Pointer to stat structure to be used. |
Reimplemented in XrdOssWrapDF, XrdOssDir, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::StatRet(), and XrdOssWrapDF::StatRet().
|
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 in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
Referenced by XrdOssCsiFileAioJob::DoItWrite1(), XrdOssCsiFileAioJob::DoItWrite2(), XrdOssCsiTagstoreFile::fullwrite(), XrdOssDFHandler::Write(), and XrdOssWrapDF::Write().
|
inlinevirtual |
Write file bytes using asynchronous I/O.
| aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented in XrdOssWrapDF, XrdOssFile, XrdPssFile, XrdOssCsiFile, XrdOssDFHandler, and XrdCephOssFile.
References nlohmann::detail::void().
|
virtual |
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 in XrdOssWrapDF, XrdOssCsiFile, and XrdOssDFHandler.
Referenced by XrdOssDFHandler::WriteV(), and XrdOssWrapDF::WriteV().
|
static |
Object is for a directory.
Return the underlying object type.
|
static |
Object is for a file.
|
static |
Object is a proxy object.
|
protected |
Referenced by DFType().
|
static |
pgw: Calculate checksums
|
static |
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] |
| 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. |
|
static |
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by getTID().
|
static |
all: Verify checksums
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). |
1.8.5