XrdCephOssFile Class Reference

#include <XrdCephOssFile.hh>

Inheritance diagram for XrdCephOssFile:
Inheritance graph
[legend]
Collaboration diagram for XrdCephOssFile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XrdCephOssFile (XrdCephOss *cephoss)
virtual ~XrdCephOssFile ()
virtual int Open (const char *path, int flags, mode_t mode, XrdOucEnv &env)
virtual int Close (long long *retsz=0)
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 *aoip)
virtual ssize_t ReadRaw (void *, off_t, size_t)
virtual int Fstat (struct stat *buff)
virtual ssize_t Write (const void *buff, off_t offset, size_t blen)
virtual int Write (XrdSfsAio *aiop)
virtual int Fsync (void)
virtual int Ftruncate (unsigned long long)

Private Attributes

int m_fd
XrdCephOssm_cephOss

Detailed Description

This class implements XrdOssDF interface for usage with a CEPH storage.

This plugin is able to use any pool of ceph with any userId. There are several ways to provide the pool and userId to be used for a given operation. Here is the ordered list of possibilities. First one defined wins :

Note that the definition of a default via the ofs.osslib directive may clash with one used in a ofs.xattrlib directive. In case both directives have a default and they are different, the behavior is not defined. In case one of the two only has a default, it will be applied for both plugins.


Constructor & Destructor Documentation

XrdCephOssFile::XrdCephOssFile ( XrdCephOss cephoss  ) 
virtual XrdCephOssFile::~XrdCephOssFile (  )  [inline, virtual]

Member Function Documentation

virtual int XrdCephOssFile::Close ( long long *  retsz = 0  )  [virtual]

Close a directory or file.

Parameters:
retsz If 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.

virtual int XrdCephOssFile::Fstat ( struct stat *  buf  )  [virtual]

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.

virtual int XrdCephOssFile::Fsync ( void   )  [virtual]

Synchronize associated file with media (synchronous).

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

Reimplemented from XrdOssDF.

virtual int XrdCephOssFile::Ftruncate ( unsigned long  long  )  [virtual]
virtual int XrdCephOssFile::Open ( const char *  path,
int  Oflag,
mode_t  Mode,
XrdOucEnv env 
) [virtual]

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.

virtual int XrdCephOssFile::Read ( XrdSfsAio aoip  )  [virtual]

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.

virtual ssize_t XrdCephOssFile::Read ( void *  buffer,
off_t  offset,
size_t  size 
) [virtual]

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.

virtual ssize_t XrdCephOssFile::Read ( off_t  offset,
size_t  size 
) [virtual]

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.

virtual ssize_t XrdCephOssFile::ReadRaw ( void *  buffer,
off_t  offset,
size_t  size 
) [virtual]

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.

virtual int XrdCephOssFile::Write ( XrdSfsAio aiop  )  [virtual]

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.

virtual ssize_t XrdCephOssFile::Write ( const void *  buffer,
off_t  offset,
size_t  size 
) [virtual]

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.


Member Data Documentation

int XrdCephOssFile::m_fd [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 7 Jul 2020 for xrootd by  doxygen 1.6.1