![]() |
XRootD
|
#include <XrdSfsNative.hh>
Public Member Functions | |
XrdSfsNativeFile (char *user=0, int monid=0) | |
~XrdSfsNativeFile () | |
int | close () |
virtual int | fctl (const int cmd, const char *args, XrdOucErrInfo &eInfo)=0 |
int | fctl (const int cmd, const char *args, XrdOucErrInfo &out_error) |
virtual int | fctl (const int cmd, int alen, const char *args, const XrdSecEntity *client=0) |
const char * | FName () |
int | getCXinfo (char cxtype[4], int &cxrsz) |
int | getMmap (void **Addr, off_t &Size) |
int | open (const char *fileName, XrdSfsFileOpenMode openMode, mode_t createMode, const XrdSecClientName *client=0, const char *opaque=0) |
int | read (XrdSfsAio *aioparm) |
XrdSfsXferSize | read (XrdSfsFileOffset fileOffset, char *buffer, XrdSfsXferSize buffer_size) |
int | read (XrdSfsFileOffset fileOffset, XrdSfsXferSize preread_sz) |
XrdSfsXferSize | readv (XrdOucIOVec *readV, int readCount) |
int | stat (struct stat *buf) |
int | sync () |
int | sync (XrdSfsAio *aiop) |
int | truncate (XrdSfsFileOffset fileOffset) |
int | write (XrdSfsAio *aioparm) |
XrdSfsXferSize | write (XrdSfsFileOffset fileOffset, const char *buffer, XrdSfsXferSize buffer_size) |
![]() | |
XrdSfsFile (const char *user=0, int MonID=0) | |
XrdSfsFile (XrdOucErrInfo &eInfo) | |
XrdSfsFile (XrdSfsFile &wrapF) | |
virtual | ~XrdSfsFile () |
Destructor. More... | |
virtual int | checkpoint (cpAct act, struct iov *range=0, int n=0) |
virtual int | fctl (const int cmd, int alen, const char *args, const XrdSecEntity *client=0) |
virtual int | open (const char *fileName, XrdSfsFileOpenMode openMode, mode_t createMode, const XrdSecEntity *client=0, const char *opaque=0)=0 |
virtual int | pgRead (XrdSfsAio *aioparm, uint64_t opts=0) |
virtual XrdSfsXferSize | pgRead (XrdSfsFileOffset offset, char *buffer, XrdSfsXferSize rdlen, uint32_t *csvec, uint64_t opts=0) |
virtual int | pgWrite (XrdSfsAio *aioparm, uint64_t opts=0) |
virtual XrdSfsXferSize | pgWrite (XrdSfsFileOffset offset, char *buffer, XrdSfsXferSize wrlen, uint32_t *csvec, uint64_t opts=0) |
virtual int | SendData (XrdSfsDio *sfDio, XrdSfsFileOffset offset, XrdSfsXferSize size) |
virtual void | setXio (XrdSfsXio *xioP) |
virtual XrdSfsXferSize | writev (XrdOucIOVec *writeV, int wdvCnt) |
Additional Inherited Members | |
![]() | |
enum | cpAct { cpCreate =0 , cpDelete , cpRestore , cpQuery , cpTrunc , cpWrite } |
![]() | |
XrdOucErrInfo & | error |
![]() | |
static const uint64_t | Verify = 0x8000000000000000ULL |
Options for pgRead() and pgWrite() as noted below. More... | |
Definition at line 87 of file XrdSfsNative.hh.
|
inline |
Definition at line 137 of file XrdSfsNative.hh.
|
inline |
Definition at line 140 of file XrdSfsNative.hh.
References close().
|
virtual |
Close the file.
Implements XrdSfsFile.
Definition at line 353 of file XrdSfsNative.cc.
References XrdSfsUFS::Close(), XrdSfsNative::Emsg(), XrdSfsFile::error, and SFS_OK.
Referenced by ~XrdSfsNativeFile(), and open().
virtual int XrdSfsFile::fctl |
Execute a special operation on the file (version 1)
cmd | - The operation to be performed (see below). SFS_FCTL_GETFD Return file descriptor if possible SFS_FCTL_STATV Reserved for future use. |
args | - specific arguments to cmd SFS_FCTL_GETFD Set to zero. |
eInfo | - The object where error info or results are to be returned. This is legacy and the error onject may be used as well. |
|
virtual |
Execute a special operation on the file (version 1)
cmd | - The operation to be performed (see below). SFS_FCTL_GETFD Return file descriptor if possible SFS_FCTL_STATV Reserved for future use. |
args | - specific arguments to cmd SFS_FCTL_GETFD Set to zero. |
eInfo | - The object where error info or results are to be returned. This is legacy and the error onject may be used as well. |
Implements XrdSfsFile.
Definition at line 377 of file XrdSfsNative.cc.
References XrdOucErrInfo::setErrCode(), XrdOucErrInfo::setErrInfo(), SFS_ERROR, SFS_FCTL_GETFD, and SFS_OK.
int XrdSfsFile::fctl |
Execute a special operation on the file (version 2)
cmd | - The operation to be performed: SFS_FCTL_SPEC1 Perform implementation defined action |
alen | - Length of data pointed to by args. |
args | - Data sent with request, zero if alen is zero. |
client | - Client's identify (see common description). |
Definition at line 489 of file XrdSfsInterface.cc.
|
inlinevirtual |
Get the file path.
Implements XrdSfsFile.
Definition at line 104 of file XrdSfsNative.hh.
|
inlinevirtual |
Get compression information for the file.
cxtype | - Place where the compression algorithm name is to be placed |
cxrsz | - Place where the compression page size is to be returned |
Implements XrdSfsFile.
Definition at line 135 of file XrdSfsNative.hh.
|
inlinevirtual |
Get file's memory mapping if one exists (memory mapped files only).
Addr | - Place where the starting memory address is returned. |
Size | - Place where the file's size is returned. |
Implements XrdSfsFile.
Definition at line 106 of file XrdSfsNative.hh.
References SFS_OK.
int XrdSfsNativeFile::open | ( | const char * | fileName, |
XrdSfsFileOpenMode | openMode, | ||
mode_t | createMode, | ||
const XrdSecClientName * | client = 0 , |
||
const char * | opaque = 0 |
||
) |
Definition at line 267 of file XrdSfsNative.cc.
References close(), XrdSfsNative::Emsg(), XrdSfsFile::error, XrdSfsNative::Mkpath(), Mode, XrdSfsUFS::Open(), S_IAMB, SFS_O_CREAT, SFS_O_MKPTH, SFS_O_RDONLY, SFS_O_RDWR, SFS_O_TRUNC, SFS_O_WRONLY, SFS_OK, stat(), XrdSfsUFS::Statfd(), and XrdSfsUFS::Statfn().
|
virtual |
Read file bytes using asynchronous I/O.
aioparm | - Pointer to async I/O object controlling the I/O. |
Implements XrdSfsFile.
Definition at line 478 of file XrdSfsNative.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, XrdSfsAio::doneRead(), read(), XrdSfsAio::Result, and XrdSfsAio::sfsAio.
|
virtual |
Read file bytes into a buffer.
offset | - The offset where the read is to start. |
buffer | - pointer to buffer where the bytes are to be placed. |
size | - The number of bytes to read. |
Implements XrdSfsFile.
Definition at line 398 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, and pread().
|
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. |
Implements XrdSfsFile.
Definition at line 109 of file XrdSfsNative.hh.
References SFS_OK.
Referenced by read().
|
virtual |
Given an array of read requests (size rdvCnt), read them from the file and place the contents consecutively in the provided buffer. A dumb default implementation is supplied but should be replaced to increase performance.
readV | pointer to the array of read requests. |
rdvCnt | the number of elements in readV. |
Reimplemented from XrdSfsFile.
Definition at line 440 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, and pread().
|
virtual |
Return state information on the file.
buf | - Pointer to the structure where info it to be returned. |
Implements XrdSfsFile.
Definition at line 555 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, SFS_OK, and XrdSfsUFS::Statfd().
Referenced by open().
|
virtual |
Make sure all outstanding data is actually written to the file (sync).
Implements XrdSfsFile.
Definition at line 580 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, fsync(), and SFS_OK.
Referenced by sync().
|
virtual |
Make sure all outstanding data is actually written to the file (async).
Implements XrdSfsFile.
Definition at line 605 of file XrdSfsNative.cc.
References XrdSfsAio::doneWrite(), XrdSfsAio::Result, and sync().
|
virtual |
Truncate the file.
fsize | - The size that the file is to have. |
Implements XrdSfsFile.
Definition at line 619 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, ftruncate(), and SFS_OK.
|
virtual |
Write file bytes using asynchronous I/O.
aioparm | - Pointer to async I/O object controlling the I/O. |
Implements XrdSfsFile.
Definition at line 539 of file XrdSfsNative.cc.
References aiocb::aio_buf, aiocb::aio_nbytes, aiocb::aio_offset, XrdSfsAio::doneWrite(), XrdSfsAio::Result, XrdSfsAio::sfsAio, and write().
|
virtual |
Write file bytes from a buffer.
offset | - The offset where the write is to start. |
buffer | - pointer to buffer where the bytes reside. |
size | - The number of bytes to write. |
Implements XrdSfsFile.
Definition at line 494 of file XrdSfsNative.cc.
References XrdSfsNative::Emsg(), XrdSfsFile::error, and pwrite().
Referenced by write().