XRootD
XrdOfsHanOss Class Reference
+ Inheritance diagram for XrdOfsHanOss:
+ Collaboration diagram for XrdOfsHanOss:

Public Member Functions

 XrdOfsHanOss (int rrc=-EBADF, int wrc=-EBADF)
 
 ~XrdOfsHanOss ()
 
int Close (long long *retsz=0)
 
int Fchmod (mode_t mode)
 
int Fstat (struct stat *)
 
int Fsync ()
 
int Fsync (XrdSfsAio *aiop)
 
int Ftruncate (unsigned long long)
 
off_t getMmap (void **addr)
 
int isCompressed (char *cxidp=0)
 
int Open (const char *, int, mode_t, XrdOucEnv &)
 
int Opendir (const char *, XrdOucEnv &)
 
ssize_t pgRead (void *buffer, off_t offset, size_t rdlen, uint32_t *csvec, uint64_t opts)
 
int pgRead (XrdSfsAio *aioparm, uint64_t opts)
 
ssize_t pgWrite (void *buffer, off_t offset, size_t wrlen, uint32_t *csvec, uint64_t opts)
 
int pgWrite (XrdSfsAio *aioparm, uint64_t opts)
 
ssize_t Read (off_t, size_t)
 
ssize_t Read (void *, off_t, size_t)
 
int Read (XrdSfsAio *aiop)
 
int Readdir (char *buff, int blen)
 
ssize_t ReadRaw (void *, off_t, size_t)
 
ssize_t ReadV (XrdOucIOVec *readV, int rdvcnt)
 
ssize_t Write (const void *, off_t, size_t)
 
int Write (XrdSfsAio *aiop)
 
ssize_t WriteV (XrdOucIOVec *writeV, int wrvcnt)
 
- Public Member Functions inherited from XrdOssDF
 XrdOssDF (const char *tid="", uint16_t dftype=0, int fdnum=-1)
 
virtual ~XrdOssDF ()
 
uint16_t DFType ()
 
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 getFD ()
 
virtual const char * getTID ()
 
virtual int StatRet (struct stat *buff)
 

Protected Attributes

int rRC
 
int wRC
 
- 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 50 of file XrdOfsHandle.cc.

Constructor & Destructor Documentation

◆ XrdOfsHanOss()

XrdOfsHanOss::XrdOfsHanOss ( int  rrc = -EBADF,
int  wrc = -EBADF 
)
inline

Definition at line 84 of file XrdOfsHandle.cc.

85  : rRC(rrc), wRC(wrc) {}

◆ ~XrdOfsHanOss()

XrdOfsHanOss::~XrdOfsHanOss ( )
inline

Definition at line 86 of file XrdOfsHandle.cc.

86 {}

Member Function Documentation

◆ Close()

int XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 82 of file XrdOfsHandle.cc.

82 {return -EBADF;}

◆ Fchmod()

int XrdOfsHanOss::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 58 of file XrdOfsHandle.cc.

58 {return wRC; }

References wRC.

◆ Fstat()

int XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 59 of file XrdOfsHandle.cc.

59 {return rRC; }

References rRC.

◆ Fsync() [1/2]

int XrdOfsHanOss::Fsync ( void  )
inlinevirtual

Synchronize associated file with media (synchronous).

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

Reimplemented from XrdOssDF.

Definition at line 60 of file XrdOfsHandle.cc.

60 {return wRC; }

References wRC.

◆ Fsync() [2/2]

int XrdOfsHanOss::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.

Definition at line 61 of file XrdOfsHandle.cc.

61 {return wRC; }

References wRC.

◆ Ftruncate()

int XrdOfsHanOss::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.

Definition at line 62 of file XrdOfsHandle.cc.

62 {return wRC; }

References wRC.

◆ getMmap()

off_t XrdOfsHanOss::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.

Definition at line 63 of file XrdOfsHandle.cc.

63 {return 0;}

◆ isCompressed()

int XrdOfsHanOss::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 64 of file XrdOfsHandle.cc.

64 {return 0;}

◆ Open()

int XrdOfsHanOss::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.

Definition at line 65 of file XrdOfsHandle.cc.

65 {return -EBADF;}

◆ Opendir()

int XrdOfsHanOss::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.

Definition at line 54 of file XrdOfsHandle.cc.

54 {return -EBADF;}

◆ pgRead() [1/2]

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

Reimplemented from XrdOssDF.

Reimplemented in XrdOfsHanOssErr.

Definition at line 66 of file XrdOfsHandle.cc.

67  {return rRC; }

References rRC.

◆ pgRead() [2/2]

int XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 68 of file XrdOfsHandle.cc.

68 {return rRC; }

References rRC.

◆ pgWrite() [1/2]

ssize_t XrdOfsHanOss::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.

Definition at line 69 of file XrdOfsHandle.cc.

70  {return wRC; }

References wRC.

◆ pgWrite() [2/2]

int XrdOfsHanOss::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.

Definition at line 71 of file XrdOfsHandle.cc.

71 {return wRC; }

References wRC.

◆ Read() [1/3]

ssize_t XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 72 of file XrdOfsHandle.cc.

72 {return rRC; }

References rRC.

◆ Read() [2/3]

ssize_t XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 73 of file XrdOfsHandle.cc.

73 {return rRC; }

References rRC.

◆ Read() [3/3]

int XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 74 of file XrdOfsHandle.cc.

74 {return rRC; }

References rRC.

◆ Readdir()

int XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 55 of file XrdOfsHandle.cc.

55 {return rRC; }

References rRC.

◆ ReadRaw()

ssize_t XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 76 of file XrdOfsHandle.cc.

76 {return rRC; }

References rRC.

◆ ReadV()

ssize_t XrdOfsHanOss::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 XrdOfsHanOssErr.

Definition at line 75 of file XrdOfsHandle.cc.

75 {return rRC; }

References rRC.

◆ Write() [1/2]

ssize_t XrdOfsHanOss::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.

Definition at line 77 of file XrdOfsHandle.cc.

77 {return wRC; }

References wRC.

◆ Write() [2/2]

int XrdOfsHanOss::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.

Definition at line 78 of file XrdOfsHandle.cc.

78 {return wRC; }

References wRC.

◆ WriteV()

ssize_t XrdOfsHanOss::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.

Definition at line 79 of file XrdOfsHandle.cc.

79 {return wRC; }

References wRC.

Member Data Documentation

◆ rRC

◆ wRC

int XrdOfsHanOss::wRC
protected

Definition at line 90 of file XrdOfsHandle.cc.

Referenced by Fchmod(), Fsync(), Ftruncate(), pgWrite(), Write(), and WriteV().


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