![]() |
XRootD
|
#include <XrdOss.hh>
Public Member Functions | |
XrdOssDF (const char *tid="", uint16_t dftype=0, int fdnum=-1) | |
virtual | ~XrdOssDF () |
virtual int | Close (long long *retsz=0)=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). More... | |
virtual int | Fstat (struct stat *buf) |
virtual int | Fsync () |
virtual int | Fsync (XrdSfsAio *aiop) |
virtual int | Ftruncate (unsigned long long flen) |
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 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 *buff) |
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) |
Static Public Attributes | |
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 uint64_t | doCalc = 0x4000000000000000ULL |
pgw: Calculate checksums More... | |
static const int | Fctl_ckpObj = 0 |
static const int | Fctl_utimes = 1 |
static const uint64_t | Verify = 0x8000000000000000ULL |
all: Verify checksums More... | |
Protected Attributes | |
uint16_t | dfType |
int | fd |
off_t | pgwEOF |
short | rsvd |
const char * | tident |
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 |
|
pure virtual |
Close a directory or file.
retsz | If not nil, where the size of the file is to be returned. |
Implemented in XrdPssFile, XrdPssDir, XrdOssDFHandler, XrdOssCsiFile, XrdOssWrapDF, XrdOssFile, XrdOssDir, XrdOfsHanOssErr, XrdOfsHanOss, XrdCephOssFile, and XrdCephOssDir.
Referenced by XrdOfsDirectory::close(), XrdOfsHanOssErr::Close(), XrdOssWrapDF::Close(), XrdOssCsiFile::Close(), XrdOssDFHandler::Close(), XrdPfc::FsTraversal::close_delete(), XrdPfc::Cache::DetermineFullFileSize(), XrdPfc::Cache::ExecuteCommandUrl(), XrdPfc::Cache::LocalFilePath(), XrdOfsHandle::Retire(), and XrdPfc::DataFsSnapshot::write_json_file().
|
inline |
Definition at line 396 of file XrdOss.hh.
References dfType.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), XrdOfsFile::checkpoint(), and XrdOssWrapDF::DFType().
|
inlinevirtual |
Change file mode settings.
mode | - The new file mode setting. |
Reimplemented in StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOssFile, and XrdOfsHanOss.
Definition at line 120 of file XrdOss.hh.
Referenced by XrdOfsFile::close(), XrdOssWrapDF::Fchmod(), XrdOssDFHandler::Fchmod(), and StatsFile::Fchmod().
|
virtual |
Reimplemented in XrdOssDFHandler, XrdOssWrapDF, and XrdOssFile.
Definition at line 150 of file XrdOss.cc.
Referenced by XrdOssWrapDF::Fctl(), XrdOssDFHandler::Fctl(), and XrdOfsChkPnt::Restore().
|
inlinevirtual |
Flush filesystem cached pages for this file (used for checksums).
Reimplemented in XrdOssDFHandler, XrdOssCsiFile, XrdOssWrapDF, and XrdOssFile.
Definition at line 126 of file XrdOss.hh.
Referenced by XrdOssWrapDF::Flush(), XrdOssCsiFile::Flush(), and XrdOssDFHandler::Flush().
|
inlinevirtual |
Return state information for this file.
buf | - Pointer to the structure where info it to be returned. |
Reimplemented in XrdOfsHanOssErr, XrdOssDFHandler, XrdCephOssFile, StatsFile, XrdOssWrapDF, XrdPssFile, XrdOssCsiFile, XrdOssFile, and XrdOfsHanOss.
Definition at line 136 of file XrdOss.hh.
Referenced by XrdOfsChkPnt::Create(), XrdPfc::File::Fstat(), XrdOssCsiFile::Fstat(), XrdOssWrapDF::Fstat(), StatsFile::Fstat(), XrdOssDFHandler::Fstat(), XrdOfsHanOssErr::Fstat(), and XrdOfsFile::stat().
|
inlinevirtual |
Synchronize associated file with media (synchronous).
Reimplemented in XrdCephOssFile, XrdPssFile, XrdOssDFHandler, XrdOssCsiFile, XrdOssWrapDF, XrdOssFile, and XrdOfsHanOss.
Definition at line 144 of file XrdOss.hh.
Referenced by XrdOssWrapDF::Fsync(), XrdOssCsiFile::Fsync(), XrdOssDFHandler::Fsync(), XrdOfsChkPnt::Restore(), XrdOfsFile::sync(), and XrdPfc::File::Sync().
|
inlinevirtual |
Synchronize associated file with media (asynchronous).
aiop | - Pointer to async I/O request object. |
Reimplemented in XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOssFile, XrdOfsHanOss, and XrdOssCsiFile.
|
inlinevirtual |
Set the size of the associated file.
flen | - The new size of the file. |
Reimplemented in XrdPssFile, XrdOssCsiFile, XrdOssFile, XrdOfsHanOss, XrdCephOssFile, StatsFile, XrdOssDFHandler, and XrdOssWrapDF.
Definition at line 164 of file XrdOss.hh.
Referenced by XrdOssWrapDF::Ftruncate(), XrdOssDFHandler::Ftruncate(), StatsFile::Ftruncate(), XrdOssCsiFile::Ftruncate(), XrdOfsChkPnt::Restore(), XrdOfsFile::truncate(), and XrdPfc::DataFsSnapshot::write_json_file().
|
inlinevirtual |
Return the underlying file descriptor.
Reimplemented in XrdOssDFHandler, XrdOssCsiFile, XrdOssWrapDF, XrdOssFile, and XrdOssDir.
Definition at line 426 of file XrdOss.hh.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), XrdPfc::Cache::ExecuteCommandUrl(), XrdOfsFile::fctl(), XrdOssWrapDF::getFD(), and XrdOssDFHandler::getFD().
|
inlinevirtual |
Return the memory mapped characteristics of the file.
addr | - Pointer to where the memory mapped address is to be returned. |
Reimplemented in XrdOssDFHandler, XrdOssCsiFile, XrdOssWrapDF, XrdOssFile, and XrdOfsHanOss.
Definition at line 176 of file XrdOss.hh.
Referenced by XrdOssWrapDF::getMmap(), XrdOssDFHandler::getMmap(), and XrdOfsFile::getMmap().
|
inlinevirtual |
Return trace identifier associated with this object.
Reimplemented in XrdOssDFHandler, and XrdOssWrapDF.
Definition at line 434 of file XrdOss.hh.
References tident.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), XrdOssWrapDF::getTID(), XrdOssDFHandler::getTID(), XrdOssAt::Opendir(), and XrdOssAt::OpenRO().
|
inlinevirtual |
Return file compression charectistics.
cxidp | - Pointer to where the compression algorithm name returned. |
Reimplemented in XrdOssDFHandler, XrdOssWrapDF, XrdOssFile, and XrdOfsHanOss.
Definition at line 187 of file XrdOss.hh.
Referenced by XrdOfsFile::getCXinfo(), XrdOssWrapDF::isCompressed(), XrdOssDFHandler::isCompressed(), and XrdOssCsiFile::Open().
|
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 StatsFile, XrdOssDFHandler, XrdOssWrapDF, XrdCephOssFile, XrdPssFile, XrdOssCsiFile, XrdOssFile, and XrdOfsHanOss.
Definition at line 200 of file XrdOss.hh.
Referenced by XrdPfc::Cache::DetermineFullFileSize(), XrdPfc::Cache::ExecuteCommandUrl(), XrdPfc::Cache::LocalFilePath(), XrdOssWrapDF::Open(), XrdOssDFHandler::Open(), StatsFile::Open(), XrdOfsChkPnt::Restore(), and XrdPfc::DataFsSnapshot::write_json_file().
|
inlinevirtual |
Open a directory.
path | - Pointer to the path of the directory to be opened. |
env | - Reference to environmental information. |
Reimplemented in StatsDirectory, XrdOssCsiDir, XrdOssWrapDF, XrdOssDFHandler, XrdPssDir, XrdOssDir, XrdOfsHanOss, and XrdCephOssDir.
Definition at line 79 of file XrdOss.hh.
Referenced by XrdPfc::Print::Print(), XrdPfc::FsTraversal::begin_traversal(), XrdOfsDirectory::open(), XrdOssDFHandler::Opendir(), XrdOssWrapDF::Opendir(), and StatsDirectory::Opendir().
|
virtual |
Reimplemented in StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOfsHanOssErr, XrdOfsHanOss, and XrdOssCsiFile.
Definition at line 160 of file XrdOss.cc.
References XrdOucPgrwUtils::csCalc(), and Read().
Referenced by XrdOfsHanOssErr::pgRead(), XrdOssWrapDF::pgRead(), XrdOssDFHandler::pgRead(), StatsFile::pgRead(), pgRead(), and XrdOfsFile::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 StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOfsHanOssErr, XrdOfsHanOss, and XrdOssCsiFile.
Definition at line 184 of file XrdOss.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, XrdSfsAio::cksVec, XrdSfsAio::doneRead(), opts, pgRead(), XrdSfsAio::Result, and XrdSfsAio::sfsAio.
|
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 StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOfsHanOss, and XrdOssCsiFile.
Definition at line 198 of file XrdOss.cc.
References XrdOucPgrwUtils::csVer(), opts, Verify, and Write().
Referenced by XrdOssWrapDF::pgWrite(), XrdOssDFHandler::pgWrite(), StatsFile::pgWrite(), pgWrite(), XrdOfsFile::pgWrite(), and XrdPfc::File::WriteBlockToDisk().
|
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 StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOfsHanOss, and XrdOssCsiFile.
Definition at line 222 of file XrdOss.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, XrdSfsAio::cksVec, XrdSfsAio::doneWrite(), opts, pgWrite(), XrdSfsAio::Result, and XrdSfsAio::sfsAio.
|
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 XrdPssFile, XrdOssCsiFile, XrdOssFile, XrdOfsHanOss, StatsFile, XrdOssWrapDF, XrdOfsHanOssErr, XrdOssDFHandler, and XrdCephOssFile.
Definition at line 281 of file XrdOss.hh.
Referenced by XrdOssCsiFileAioJob::DoItRead1(), XrdOssCsiFileAioJob::DoItRead2(), XrdOssCsiTagstoreFile::fullread(), XrdOssCsiPages::maxread(), XrdOssCsiFile::pgRead(), pgRead(), XrdPfc::File::Read(), XrdOssDFHandler::Read(), XrdOfsHanOssErr::Read(), XrdOssWrapDF::Read(), StatsFile::Read(), XrdOssCsiFile::Read(), XrdOfsFile::read(), ReadV(), XrdOfsChkPnt::Truncate(), and XrdOfsChkPnt::Write().
|
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 StatsFile, XrdOssWrapDF, XrdOfsHanOssErr, XrdOssDFHandler, XrdCephOssFile, XrdPssFile, XrdOssCsiFile, XrdOssFile, and XrdOfsHanOss.
|
inlinevirtual |
Read file bytes using asynchronous I/O.
aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented in StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOssFile, XrdOfsHanOssErr, XrdOfsHanOss, XrdCephOssFile, and XrdOssCsiFile.
|
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 StatsDirectory, XrdPssDir, XrdOssDFHandler, XrdOssCsiDir, XrdOssWrapDF, XrdOssDir, XrdOfsHanOssErr, XrdOfsHanOss, and XrdCephOssDir.
Definition at line 92 of file XrdOss.hh.
Referenced by XrdOfsDirectory::nextEntry(), XrdOfsHanOssErr::Readdir(), XrdOssWrapDF::Readdir(), XrdOssCsiDir::Readdir(), XrdOssDFHandler::Readdir(), StatsDirectory::Readdir(), and XrdPfc::FsTraversal::slurp_dir_ll().
|
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 StatsFile, XrdOssWrapDF, XrdOfsHanOssErr, XrdOssDFHandler, XrdPssFile, XrdOssCsiFile, XrdOssFile, XrdOfsHanOss, and XrdCephOssFile.
Definition at line 319 of file XrdOss.hh.
Referenced by XrdOfsFile::read(), XrdOssCsiFile::ReadRaw(), XrdOssDFHandler::ReadRaw(), XrdOfsHanOssErr::ReadRaw(), XrdOssWrapDF::ReadRaw(), and StatsFile::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 XrdOssFile, StatsFile, XrdOssWrapDF, XrdOfsHanOssErr, XrdOfsHanOss, XrdPssFile, XrdOssDFHandler, and XrdOssCsiFile.
Definition at line 236 of file XrdOss.cc.
References Read().
Referenced by XrdPfc::File::ReadV(), XrdOssCsiFile::ReadV(), XrdOssDFHandler::ReadV(), XrdOfsHanOssErr::ReadV(), XrdOssWrapDF::ReadV(), StatsFile::ReadV(), and XrdOfsFile::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, XrdOssDFHandler, and XrdOssDir.
Definition at line 107 of file XrdOss.hh.
Referenced by XrdOfsDirectory::autoStat(), XrdPfc::FsTraversal::slurp_dir_ll(), 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 StatsFile, XrdOssWrapDF, XrdOssDFHandler, XrdCephOssFile, XrdPssFile, XrdOssCsiFile, XrdOssFile, and XrdOfsHanOss.
Definition at line 345 of file XrdOss.hh.
Referenced by XrdOssCsiFileAioJob::DoItWrite1(), XrdOssCsiFileAioJob::DoItWrite2(), XrdOssCsiTagstoreFile::fullwrite(), XrdOssCsiFile::pgWrite(), pgWrite(), XrdOssCsiFile::Write(), XrdOssDFHandler::Write(), XrdOssWrapDF::Write(), StatsFile::Write(), XrdOfsFile::write(), XrdPfc::DataFsSnapshot::write_json_file(), XrdPfc::File::WriteBlockToDisk(), and WriteV().
|
inlinevirtual |
Write file bytes using asynchronous I/O.
aiop | - Pointer to async I/O object controlling the I/O. |
Reimplemented in StatsFile, XrdPssFile, XrdOssDFHandler, XrdOssWrapDF, XrdOssFile, XrdOfsHanOss, XrdCephOssFile, and XrdOssCsiFile.
|
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 StatsFile, XrdOssWrapDF, XrdOfsHanOss, XrdOssDFHandler, and XrdOssCsiFile.
Definition at line 257 of file XrdOss.cc.
References Write().
Referenced by XrdOfsChkPnt::Restore(), XrdOssCsiFile::WriteV(), XrdOssDFHandler::WriteV(), XrdOssWrapDF::WriteV(), and StatsFile::WriteV().
|
static |
|
static |
|
static |
Object is a proxy object.
Definition at line 394 of file XrdOss.hh.
Referenced by XrdOfsFile::checkpoint().
|
protected |
Definition at line 456 of file XrdOss.hh.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), and DFType().
|
static |
pgw: Calculate checksums
Definition at line 225 of file XrdOss.hh.
Referenced by XrdPssFile::pgWrite(), and XrdOssCsiPages::StoreRange().
|
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 |
Definition at line 416 of file XrdOss.hh.
Referenced by XrdOssFile::Fctl(), and XrdOfsChkPnt::Restore().
|
protected |
Definition at line 455 of file XrdOss.hh.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), XrdOssDir::XrdOssDir(), XrdOssFile::~XrdOssFile(), XrdPssFile::~XrdPssFile(), XrdOssFile::Close(), XrdPssFile::Close(), XrdOssFile::Fchmod(), XrdOssFile::Fctl(), XrdOssFile::Flush(), XrdOssFile::Fstat(), XrdPssFile::Fstat(), XrdPssFile::Fsync(), XrdOssFile::Fsync(), XrdOssFile::Ftruncate(), XrdPssFile::Ftruncate(), XrdOssDir::getFD(), XrdOssFile::getFD(), XrdOssFile::Open(), XrdPssFile::Open(), XrdOssDir::Opendir(), XrdPssFile::pgRead(), XrdPssFile::pgWrite(), XrdPssFile::Read(), XrdOssFile::Read(), XrdOssDir::Readdir(), XrdOssFile::ReadRaw(), XrdPssFile::ReadV(), XrdOssFile::ReadV(), XrdPssFile::Write(), and XrdOssFile::Write().
|
protected |
Definition at line 453 of file XrdOss.hh.
Referenced by XrdOfsHanOssErr::XrdOfsHanOssErr(), XrdPssFile::Fstat(), XrdOssFile::Fsync(), getTID(), XrdOssFile::Open(), XrdOssFile::Read(), and XrdOssFile::Write().
|
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). |
Definition at line 223 of file XrdOss.hh.
Referenced by XrdOssCsiPages::FetchRange(), XrdOssCsiPages::FetchRangeAligned(), XrdOssCsiPages::FetchRangeUnaligned(), XrdOssCsiPages::FetchRangeUnaligned_postblock(), XrdOssCsiPages::FetchRangeUnaligned_preblock(), XrdOfsFile::pgRead(), pgWrite(), XrdPssFile::pgWrite(), XrdOfsFile::pgWrite(), XrdOssCsiPages::pgWritePrelockCheck(), XrdOssCsiPages::VerifyRangeAligned(), and XrdOssCsiPages::VerifyRangeUnaligned().