XRootD
XrdOssDFHandler Class Reference

#include <XrdOssHandler.hh>

+ Inheritance diagram for XrdOssDFHandler:
+ Collaboration diagram for XrdOssDFHandler:

Public Member Functions

 XrdOssDFHandler (XrdOssDF *successor)
 
virtual ~XrdOssDFHandler ()
 
virtual int Close (long long *retsz=0)
 
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 *buff)
 
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 *dir_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 blen)
 
virtual ssize_t Read (void *buff, off_t offset, size_t blen)
 
virtual int Read (XrdSfsAio *aiop)
 
virtual int Readdir (char *buff, int blen)
 
virtual ssize_t ReadRaw (void *buff, off_t offset, size_t blen)
 
virtual ssize_t ReadV (XrdOucIOVec *readV, int n)
 
virtual int StatRet (struct stat *buff)
 
virtual ssize_t Write (const void *buff, off_t offset, size_t blen)
 
virtual int Write (XrdSfsAio *aiop)
 
virtual ssize_t WriteV (XrdOucIOVec *writeV, int n)
 
- Public Member Functions inherited from XrdOssDF
 XrdOssDF (const char *tid="", uint16_t dftype=0, int fdnum=-1)
 
virtual ~XrdOssDF ()
 
uint16_t DFType ()
 

Protected Attributes

XrdOssDFsuccessor_
 
- 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. 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...
 

Detailed Description

Definition at line 41 of file XrdOssHandler.hh.

Constructor & Destructor Documentation

◆ XrdOssDFHandler()

XrdOssDFHandler::XrdOssDFHandler ( XrdOssDF successor)
inline

Definition at line 77 of file XrdOssHandler.hh.

77 : XrdOssDF(successor->getTID(), successor->DFType(), successor->getFD()), successor_(successor) { }
XrdOssDF * successor_
XrdOssDF(const char *tid="", uint16_t dftype=0, int fdnum=-1)
Definition: XrdOss.hh:444
virtual const char * getTID()
Definition: XrdOss.hh:434
virtual int getFD()
Definition: XrdOss.hh:426
uint16_t DFType()
Definition: XrdOss.hh:396

◆ ~XrdOssDFHandler()

virtual XrdOssDFHandler::~XrdOssDFHandler ( )
inlinevirtual

Definition at line 78 of file XrdOssHandler.hh.

78 { delete successor_; }

References successor_.

Member Function Documentation

◆ Close()

virtual int XrdOssDFHandler::Close ( long long *  retsz = 0)
inlinevirtual

Close a directory or file.

Parameters
retszIf not nil, where the size of the file is to be returned.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 73 of file XrdOssHandler.hh.

73 { return successor_->Close(retsz); }
virtual int Close(long long *retsz=0)=0

References XrdOssDF::Close(), and successor_.

+ Here is the call graph for this function:

◆ Fchmod()

virtual int XrdOssDFHandler::Fchmod ( mode_t  mode)
inlinevirtual

Change file mode settings.

Parameters
mode- The new file mode setting.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Definition at line 49 of file XrdOssHandler.hh.

49 { return successor_->Fchmod(Mode); }
int Mode
virtual int Fchmod(mode_t mode)
Definition: XrdOss.hh:120

References XrdOssDF::Fchmod(), Mode, and successor_.

+ Here is the call graph for this function:

◆ Fctl()

virtual int XrdOssDFHandler::Fctl ( int  cmd,
int  alen,
const char *  args,
char **  resp = 0 
)
inlinevirtual

Reimplemented from XrdOssDF.

Definition at line 74 of file XrdOssHandler.hh.

74 { return successor_->Fctl(cmd, alen, args, resp); }
virtual int Fctl(int cmd, int alen, const char *args, char **resp=0)
Definition: XrdOss.cc:150

References XrdOssDF::Fctl(), and successor_.

+ Here is the call graph for this function:

◆ Flush()

virtual void XrdOssDFHandler::Flush ( )
inlinevirtual

Flush filesystem cached pages for this file (used for checksums).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 50 of file XrdOssHandler.hh.

50 { successor_->Flush(); }
virtual void Flush()
Flush filesystem cached pages for this file (used for checksums).
Definition: XrdOss.hh:126

References XrdOssDF::Flush(), and successor_.

+ Here is the call graph for this function:

◆ Fstat()

virtual int XrdOssDFHandler::Fstat ( struct stat buf)
inlinevirtual

Return state information for this file.

Parameters
buf- Pointer to the structure where info it to be returned.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 51 of file XrdOssHandler.hh.

51 { return successor_->Fstat(buff); }
virtual int Fstat(struct stat *buf)
Definition: XrdOss.hh:136

References XrdOssDF::Fstat(), and successor_.

+ Here is the call graph for this function:

◆ Fsync() [1/2]

virtual int XrdOssDFHandler::Fsync ( void  )
inlinevirtual

Synchronize associated file with media (synchronous).

Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 52 of file XrdOssHandler.hh.

52 { return successor_->Fsync(); }
virtual int Fsync()
Definition: XrdOss.hh:144

References XrdOssDF::Fsync(), and successor_.

+ Here is the call graph for this function:

◆ Fsync() [2/2]

virtual int XrdOssDFHandler::Fsync ( XrdSfsAio aiop)
inlinevirtual

Synchronize associated file with media (asynchronous).

Parameters
aiop- Pointer to async I/O request object.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 53 of file XrdOssHandler.hh.

53 { return successor_->Fsync(aiop); }

References XrdOssDF::Fsync(), and successor_.

+ Here is the call graph for this function:

◆ Ftruncate()

virtual int XrdOssDFHandler::Ftruncate ( unsigned long long  flen)
inlinevirtual

Set the size of the associated file.

Parameters
flen- The new size of the file.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 54 of file XrdOssHandler.hh.

54 { return successor_->Ftruncate(flen); }
virtual int Ftruncate(unsigned long long flen)
Definition: XrdOss.hh:164

References XrdOssDF::Ftruncate(), and successor_.

+ Here is the call graph for this function:

◆ getFD()

virtual int XrdOssDFHandler::getFD ( )
inlinevirtual

Return the underlying file descriptor.

Returns
-1 if there is no file descriptor or a non-negative FD number.

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 55 of file XrdOssHandler.hh.

55 { return successor_->getFD(); }

References XrdOssDF::getFD(), and successor_.

+ Here is the call graph for this function:

◆ getMmap()

virtual off_t XrdOssDFHandler::getMmap ( void **  addr)
inlinevirtual

Return the memory mapped characteristics of the file.

Parameters
addr- Pointer to where the memory mapped address is to be returned.
Returns
If mapped, the size of the file is returned and it memory location is placed in addr. Otherwise, addr is set to zero and zero is returned. Note that zero length files cannot be memory mapped.

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 56 of file XrdOssHandler.hh.

56 { return successor_->getMmap(addr); }
virtual off_t getMmap(void **addr)
Definition: XrdOss.hh:176

References XrdOssDF::getMmap(), and successor_.

+ Here is the call graph for this function:

◆ getTID()

virtual const char* XrdOssDFHandler::getTID ( )
inlinevirtual

Return trace identifier associated with this object.

Returns
Pointer to trace identifier

Reimplemented from XrdOssDF.

Definition at line 75 of file XrdOssHandler.hh.

75 { return successor_->getTID(); }

References XrdOssDF::getTID(), and successor_.

+ Here is the call graph for this function:

◆ isCompressed()

virtual int XrdOssDFHandler::isCompressed ( char *  cxidp = 0)
inlinevirtual

Return file compression charectistics.

Parameters
cxidp- Pointer to where the compression algorithm name returned.
Returns
If the file is compressed, the region size if returned. Otherwise, zero is returned (file not compressed).

Reimplemented from XrdOssDF.

Definition at line 57 of file XrdOssHandler.hh.

57 { return successor_->isCompressed(cxidp); }
virtual int isCompressed(char *cxidp=0)
Definition: XrdOss.hh:187

References XrdOssDF::isCompressed(), and successor_.

+ Here is the call graph for this function:

◆ Open()

virtual int XrdOssDFHandler::Open ( const char *  path,
int  Oflag,
mode_t  Mode,
XrdOucEnv env 
)
inlinevirtual

Open a file.

Parameters
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.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 58 of file XrdOssHandler.hh.

58 { return successor_->Open(path, Oflag, Mode, Env); }
virtual int Open(const char *path, int Oflag, mode_t Mode, XrdOucEnv &env)
Definition: XrdOss.hh:200

References Mode, XrdOssDF::Open(), and successor_.

+ Here is the call graph for this function:

◆ Opendir()

virtual int XrdOssDFHandler::Opendir ( const char *  path,
XrdOucEnv env 
)
inlinevirtual

Open a directory.

Parameters
path- Pointer to the path of the directory to be opened.
env- Reference to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiDir.

Definition at line 44 of file XrdOssHandler.hh.

44 { return successor_->Opendir(dir_path, Env); }
virtual int Opendir(const char *path, XrdOucEnv &env)
Definition: XrdOss.hh:79

References XrdOssDF::Opendir(), and successor_.

+ Here is the call graph for this function:

◆ pgRead() [1/2]

virtual ssize_t XrdOssDFHandler::pgRead ( void *  buffer,
off_t  offset,
size_t  rdlen,
uint32_t *  csvec,
uint64_t  opts 
)
inlinevirtual

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 59 of file XrdOssHandler.hh.

59 { return successor_->pgRead(buffer, offset, rdlen, csvec, opts); }
struct myOpts opts
virtual ssize_t pgRead(void *buffer, off_t offset, size_t rdlen, uint32_t *csvec, uint64_t opts)
Definition: XrdOss.cc:160

References opts, XrdOssDF::pgRead(), and successor_.

+ Here is the call graph for this function:

◆ pgRead() [2/2]

virtual int XrdOssDFHandler::pgRead ( XrdSfsAio aioparm,
uint64_t  opts 
)
inlinevirtual

Read file pages and checksums using asynchronous I/O.

Parameters
aioparm- Pointer to async I/O object controlling the I/O.
opts- Processing options (see above).
Returns
0 upon if request started success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 60 of file XrdOssHandler.hh.

60 { return successor_->pgRead(aioparm, opts); }

References opts, XrdOssDF::pgRead(), and successor_.

+ Here is the call graph for this function:

◆ pgWrite() [1/2]

virtual ssize_t XrdOssDFHandler::pgWrite ( void *  buffer,
off_t  offset,
size_t  wrlen,
uint32_t *  csvec,
uint64_t  opts 
)
inlinevirtual

Write file pages into a file with corresponding checksums.

Parameters
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).
Returns
>= 0 The number of bytes written upon success. or -errno or -osserr upon failure. (see XrdOssError.hh).
< 0 -errno or -osserr upon failure. (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 61 of file XrdOssHandler.hh.

61 { return successor_->pgWrite(buffer, offset, wrlen, csvec, opts); }
virtual ssize_t pgWrite(void *buffer, off_t offset, size_t wrlen, uint32_t *csvec, uint64_t opts)
Definition: XrdOss.cc:198

References opts, XrdOssDF::pgWrite(), and successor_.

+ Here is the call graph for this function:

◆ pgWrite() [2/2]

virtual int XrdOssDFHandler::pgWrite ( XrdSfsAio aioparm,
uint64_t  opts 
)
inlinevirtual

Write file pages and checksums using asynchronous I/O.

Parameters
aioparm- Pointer to async I/O object controlling the I/O.
opts- Processing options (see above).
Returns
0 upon if request started success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 62 of file XrdOssHandler.hh.

62 { return successor_->pgWrite(aioparm, opts); }

References opts, XrdOssDF::pgWrite(), and successor_.

+ Here is the call graph for this function:

◆ Read() [1/3]

virtual ssize_t XrdOssDFHandler::Read ( off_t  offset,
size_t  size 
)
inlinevirtual

Preread file blocks into the file system cache.

Parameters
offset- The offset where the read is to start.
size- The number of bytes to pre-read.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 63 of file XrdOssHandler.hh.

63 { return successor_->Read(offset, blen); }
virtual ssize_t Read(off_t offset, size_t size)
Definition: XrdOss.hh:281

References XrdOssDF::Read(), and successor_.

+ Here is the call graph for this function:

◆ Read() [2/3]

virtual ssize_t XrdOssDFHandler::Read ( void *  buffer,
off_t  offset,
size_t  size 
)
inlinevirtual

Read file bytes into a buffer.

Parameters
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.
Returns
>= 0 The number of bytes that placed in buffer.
< 0 -errno or -osserr upon failure (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 64 of file XrdOssHandler.hh.

64 { return successor_->Read(buff, offset, blen); }

References XrdOssDF::Read(), and successor_.

+ Here is the call graph for this function:

◆ Read() [3/3]

virtual int XrdOssDFHandler::Read ( XrdSfsAio aiop)
inlinevirtual

Read file bytes using asynchronous I/O.

Parameters
aiop- Pointer to async I/O object controlling the I/O.
Returns
0 upon if request started success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 65 of file XrdOssHandler.hh.

65 { return successor_->Read(aiop); }

References XrdOssDF::Read(), and successor_.

+ Here is the call graph for this function:

◆ Readdir()

virtual int XrdOssDFHandler::Readdir ( char *  buff,
int  blen 
)
inlinevirtual

Get the next directory entry.

Parameters
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.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiDir.

Definition at line 45 of file XrdOssHandler.hh.

45 { return successor_->Readdir(buff, blen); }
virtual int Readdir(char *buff, int blen)
Definition: XrdOss.hh:92

References XrdOssDF::Readdir(), and successor_.

+ Here is the call graph for this function:

◆ ReadRaw()

virtual ssize_t XrdOssDFHandler::ReadRaw ( void *  buffer,
off_t  offset,
size_t  size 
)
inlinevirtual

Read uncompressed file bytes into a buffer.

Parameters
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.
Returns
>= 0 The number of bytes that placed in buffer.
< 0 -errno or -osserr upon failure (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 66 of file XrdOssHandler.hh.

66 { return successor_->ReadRaw(buff, offset, blen); }
virtual ssize_t ReadRaw(void *buffer, off_t offset, size_t size)
Definition: XrdOss.hh:319

References XrdOssDF::ReadRaw(), and successor_.

+ Here is the call graph for this function:

◆ ReadV()

virtual ssize_t XrdOssDFHandler::ReadV ( XrdOucIOVec readV,
int  rdvcnt 
)
inlinevirtual

Read file bytes as directed by the read vector.

Parameters
readVpointer to the array of read requests.
rdvcntthe number of elements in readV.
Returns
>=0 The numbe of bytes read.
< 0 -errno or -osserr upon failure (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 67 of file XrdOssHandler.hh.

67 { return successor_->ReadV(readV, n); }
virtual ssize_t ReadV(XrdOucIOVec *readV, int rdvcnt)
Definition: XrdOss.cc:236

References XrdOssDF::ReadV(), and successor_.

+ Here is the call graph for this function:

◆ StatRet()

virtual int XrdOssDFHandler::StatRet ( struct stat buff)
inlinevirtual

Set the stat() buffer where stat information is to be placed corresponding to the directory entry returned by Readdir().

Parameters
buff- Pointer to stat structure to be used.
Returns
0 upon success or -ENOTSUP if not supported.
Note
This is a one-time call as stat structure is reused for each Readdir.
When StatRet() is in effect, directory entries that have been deleted from the target directory are quietly skipped.

Reimplemented from XrdOssDF.

Definition at line 46 of file XrdOssHandler.hh.

46 { return successor_->StatRet(buff); }
virtual int StatRet(struct stat *buff)
Definition: XrdOss.hh:107

References XrdOssDF::StatRet(), and successor_.

+ Here is the call graph for this function:

◆ Write() [1/2]

virtual ssize_t XrdOssDFHandler::Write ( const void *  buffer,
off_t  offset,
size_t  size 
)
inlinevirtual

Write file bytes from a buffer.

Parameters
buffer- pointer to buffer where the bytes reside.
offset- The offset where the write is to start.
size- The number of bytes to write.
Returns
>= 0 The number of bytes that were written.
< 0 -errno or -osserr upon failure (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 68 of file XrdOssHandler.hh.

68 { return successor_->Write(buff, offset, blen); }
virtual ssize_t Write(const void *buffer, off_t offset, size_t size)
Definition: XrdOss.hh:345

References successor_, and XrdOssDF::Write().

+ Here is the call graph for this function:

◆ Write() [2/2]

virtual int XrdOssDFHandler::Write ( XrdSfsAio aiop)
inlinevirtual

Write file bytes using asynchronous I/O.

Parameters
aiop- Pointer to async I/O object controlling the I/O.
Returns
0 upon if request started success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 69 of file XrdOssHandler.hh.

69 { return successor_->Write(aiop); }

References successor_, and XrdOssDF::Write().

+ Here is the call graph for this function:

◆ WriteV()

virtual ssize_t XrdOssDFHandler::WriteV ( XrdOucIOVec writeV,
int  wrvcnt 
)
inlinevirtual

Write file bytes as directed by the write vector.

Parameters
writeVpointer to the array of write requests.
wrvcntthe number of elements in writeV.
Returns
>=0 The numbe of bytes read.
< 0 -errno or -osserr upon failure (see XrdOssError.hh).

Reimplemented from XrdOssDF.

Reimplemented in XrdOssCsiFile.

Definition at line 70 of file XrdOssHandler.hh.

70 { return successor_->WriteV(writeV, n); }
virtual ssize_t WriteV(XrdOucIOVec *writeV, int wrvcnt)
Definition: XrdOss.cc:257

References successor_, and XrdOssDF::WriteV().

+ Here is the call graph for this function:

Member Data Documentation

◆ successor_


The documentation for this class was generated from the following file: