Extended POSIX interface to XRootD. More...
#include <XrdPosixExtra.hh>
Public Member Functions | |
| XrdPosixExtra () | |
| ~XrdPosixExtra () | |
Static Public Member Functions | |
| static int | Fctl (int fildes, XrdOucCacheOp::Code opc, const std::string &args, std::string &resp) |
| static int | FSctl (XrdOucCacheOp::Code opc, const std::string &args, std::string &resp, bool viaCache=false, bool viaRedir=false) |
| static ssize_t | pgRead (int fildes, void *buffer, off_t offset, size_t rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, XrdPosixCallBackIO *cbp=0) |
| static ssize_t | pgWrite (int fildes, void *buffer, off_t offset, size_t wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, XrdPosixCallBackIO *cbp=0) |
| static int | PreRead (int fildes, off_t offs, int size) |
| static int | PreRead (int fildes, XrdOucRangeList &rlist) |
Static Public Attributes | |
| static const uint64_t | forceCS = 0x0000000000000001ULL |
Extended POSIX interface to XRootD.
Definition at line 49 of file XrdPosixExtra.hh.
|
inline |
Definition at line 171 of file XrdPosixExtra.hh.
|
inline |
Definition at line 172 of file XrdPosixExtra.hh.
|
static |
Perform file oriented control operation (i.e. a query).
| fildes | - Posix file descriptor of associated file. |
| opc | - The requested operation (e.g. QFinfo). |
| args | - The arguments (this is not necessarily a URL) |
| resp | - Where the result is to be placed. |
Definition at line 62 of file XrdPosixExtra.cc.
References XrdOucCacheIO::Fcntl(), XrdPosixObject::File(), XrdOucCacheOp::QFinfo, and XrdPosixFile::XCio.
Referenced by XrdPssFile::Fctl().
|
static |
Perform file system oriented control operation (i.e. a query).
| opc | - The requested operation (e.g. QFSinfo). |
| args | - The arguments (this should be a URL). |
| resp | - Where the result is to be placed. |
| viaCache- | False -> Bypass calling any cache using URL in args. True -> Use Cache object API if cache enabled. Otherwise, assume viaCache is false; |
| viaRedir- | False -> Send request directly to endpoint. True -> If endpoint is a redirector, send request to the redirected endpoint (i.e. via redirect) |
Definition at line 93 of file XrdPosixExtra.cc.
References XrdPosixGlobals::ecMsg, XrdCl::QueryCode::FSInfo, XrdOucCacheOp::QFSinfo, XrdPosixAdmin::Query(), XrdPosixAdmin::Stat(), and XrdPosixGlobals::theCache.
Referenced by XrdPssSys::FSctl().
|
static |
Definition at line 135 of file XrdPosixExtra.cc.
References XrdPosixCallBackIO::Complete(), XrdPosixObject::ecMsg, XrdPosixObject::File(), XrdOucCacheIO::forceCS, forceCS, opts, XrdOucCacheIO::pgRead(), XrdPosixObject::Ref(), XrdOucECMsg::SetErrno(), XrdPosixObject::UnLock(), and XrdPosixFile::XCio.
Referenced by XrdPssFile::pgRead(), and XrdPssFile::pgRead().
|
static |
Write file pages into a file with corresponding checksums.
| fildes | - File descriptor |
| 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. be the last write to the file at or above the offset. |
| csvec | - A vector which contains the corresponding CRC32 checksum for each page or page segment. If size is 0, then checksums are calculated. If not zero, the size must equal the required number of checksums for offset/wrlen. |
| opts | - Options as noted. |
| cbp | - When supplied, return is made via callback. |
Definition at line 199 of file XrdPosixExtra.cc.
References XrdPosixCallBackIO::Complete(), XrdOucPgrwUtils::csCalc(), XrdOucPgrwUtils::csNum(), XrdPosixObject::ecMsg, XrdPosixObject::File(), opts, XrdOucCacheIO::pgWrite(), XrdPosixObject::Ref(), XrdOucECMsg::SetErrno(), XrdPosixObject::UnLock(), XrdPosixFile::UpdtSize(), and XrdPosixFile::XCio.
Referenced by XrdPssFile::pgWrite(), and XrdPssFile::pgWrite().
|
static |
Preread a range of bytes.
| fildes | - File descriptor The file descriptor must refer to an open file. |
| offs | - The offset at which to start the preread. |
| size | - The numbert of bytes to preread. |
Definition at line 273 of file XrdPosixExtra.cc.
References XrdPosixObject::File().
|
static |
Preread a list of byte ranges in one operation
| fildes | - File descriptor The file descriptor must refer to an open file. |
| rlist | - list of the byte ranges to preread. The default maximum size is 2097136 bytes and the default maximum number of request is 1024. Be aware the the server may support a different combination and may be queried for its defaults. |
Definition at line 286 of file XrdPosixExtra.cc.
References XrdPosixObject::File().
|
static |
Read file pages into a buffer and return corresponding checksums.
| fildes | - File descriptor |
| buffer | - pointer to buffer where the bytes are to be placed. |
| offset | - The offset where the read is to start. |
| rdlen | - The number of bytes to read. |
| csvec | - A vector to be filled with the corresponding CRC32C checksums for each page or page segment, if available. |
| opts | - Options as noted. |
| cbp | - Async version: return is made via callback. |
Definition at line 109 of file XrdPosixExtra.hh.
Referenced by pgRead(), XrdPssFile::pgRead(), and XrdPssFile::pgRead().