XrdCephOss Class Reference

#include <XrdCephOss.hh>

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

List of all members.

Public Member Functions

 XrdCephOss (const char *, XrdSysError &)
virtual ~XrdCephOss ()
int Configure (const char *, XrdSysError &)
virtual int Chmod (const char *, mode_t mode, XrdOucEnv *eP=0)
virtual int Create (const char *, const char *, mode_t, XrdOucEnv &, int opts=0)
virtual int Init (XrdSysLogger *, const char *)
virtual int Mkdir (const char *, mode_t mode, int mkpath=0, XrdOucEnv *eP=0)
virtual int Remdir (const char *, int Opts=0, XrdOucEnv *eP=0)
virtual int Rename (const char *, const char *, XrdOucEnv *eP1=0, XrdOucEnv *eP2=0)
virtual int Stat (const char *, struct stat *, int opts=0, XrdOucEnv *eP=0)
virtual int StatFS (const char *path, char *buff, int &blen, XrdOucEnv *eP=0)
virtual int StatVS (XrdOssVSInfo *sP, const char *sname=0, int updt=0)
virtual int Truncate (const char *, unsigned long long, XrdOucEnv *eP=0)
virtual int Unlink (const char *path, int Opts=0, XrdOucEnv *eP=0)
virtual XrdOssDFnewDir (const char *tident)
virtual XrdOssDFnewFile (const char *tident)

Detailed Description

This class implements XrdOss interface for usage with a CEPH storage. It should be loaded via the ofs.osslib directive.

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

XrdCephOss::XrdCephOss ( const char *  ,
XrdSysError  
)
virtual XrdCephOss::~XrdCephOss (  )  [virtual]

Member Function Documentation

virtual int XrdCephOss::Chmod ( const char *  path,
mode_t  mode,
XrdOucEnv envP = 0 
) [virtual]

Change file mode settings.

Parameters:
path - Pointer to the path of the file in question.
mode - The new file mode setting.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

int XrdCephOss::Configure ( const char *  ,
XrdSysError  
)
virtual int XrdCephOss::Create ( const char *  ,
const char *  ,
mode_t  ,
XrdOucEnv ,
int  opts = 0 
) [virtual]

Create file.

Parameters:
path - Pointer to the path of the file to create.
mode - The new file mode setting.
env - Reference to environmental information.
opts - Create options: XRDOSS_mkpath - create dir path if it does not exist. XRDOSS_new - the file must not already exist. oflags<<8 - open flags shifted 8 bits to the left/
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::Init ( XrdSysLogger lp,
const char *  cfn 
) [virtual]

Initialize the storage system V1 (deprecated).

Parameters:
lp - Pointer to the message logging object.
cfn - Pointer to the configuration file.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::Mkdir ( const char *  path,
mode_t  mode,
int  mkpath = 0,
XrdOucEnv envP = 0 
) [virtual]

Create a directory.

Parameters:
path - Pointer to the path of the directory to be created.
mode - The directory mode setting.
mkpath - When true the path is created if it does not exist.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual XrdOssDF* XrdCephOss::newDir ( const char *  tident  )  [virtual]

Obtain a new director object to be used for future directory requests.

Parameters:
tident - The trace identifier.
Returns:
pointer- Pointer to an XrdOssDF object.
nil - Insufficient memory to allocate an object.

Implements XrdOss.

virtual XrdOssDF* XrdCephOss::newFile ( const char *  tident  )  [virtual]

Obtain a new file object to be used for a future file requests.

Parameters:
tident - The trace identifier.
Returns:
pointer- Pointer to an XrdOssDF object.
nil - Insufficient memory to allocate an object.

Implements XrdOss.

virtual int XrdCephOss::Remdir ( const char *  path,
int  Opts = 0,
XrdOucEnv envP = 0 
) [virtual]

Remove a directory.

Parameters:
path - Pointer to the path of the directory to be removed.
opts - The processing options: XRDOSS_Online - only remove online copy XRDOSS_isPFN - path is already translated.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::Rename ( const char *  oPath,
const char *  nPath,
XrdOucEnv oEnvP = 0,
XrdOucEnv nEnvP = 0 
) [virtual]

Rename a file or directory.

Parameters:
oPath - Pointer to the path to be renamed.
nPath - Pointer to the path oPath is to have.
oEnvP - Environmental information for oPath.
nEnvP - Environmental information for nPath.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::Stat ( const char *  path,
struct stat *  buff,
int  opts = 0,
XrdOucEnv envP = 0 
) [virtual]

Return state information on a file or directory.

Parameters:
path - Pointer to the path in question.
buff - Pointer to the structure where info it to be returned.
opts - Options: XRDOSS_preop - this is a stat prior to open. XRDOSS_resonly - only look for resident files. XRDOSS_updtatm - update file access time.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::StatFS ( const char *  path,
char *  buff,
int &  blen,
XrdOucEnv envP = 0 
) [virtual]

Return filesystem physical space information associated with a path.

Parameters:
path - Path in the partition in question.
buff - Pointer to the buffer to hold the information.
blen - Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf().
opts - Options: XRDEXP_STAGE - info for stageable space wanted. XRDEXP_NOTRW - info for Read/Only space wanted.
envP - Pointer to environmental information.
Returns:
"<wval> <fsp> <utl> <sval> <fsp> <utl>" where: <wval> is "0" if XRDEXP_NOTRW specified, otherwise "1" <fsp> is free space in megabytes. <utl> is percentage utilization (i.e. allocated space) <sval> is "1' if XRDEXP_STAGE specified, otherwise "0 Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

virtual int XrdCephOss::StatVS ( XrdOssVSInfo vsP,
const char *  sname = 0,
int  updt = 0 
) [virtual]

Return space information for a space name.

Parameters:
vsP - Pointer to the XrdOssVSInfo object to hold results. It should be fully initialized (i.e. a new copy).
sname - Pointer to the space name. If the name starts with a plus (e.g. "+public"), partition information is returned, should it exist. If nil, space information for all spaces is returned. See, XrdOssVS.hh for more info.
updt - When true, a space update occurrs prior to a query.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

virtual int XrdCephOss::Truncate ( const char *  path,
unsigned long  fsize,
XrdOucEnv envP = 0 
) [virtual]

Truncate a file.

Parameters:
path - Pointer to the path of the file to be truncated.
fsize - The size that the file is to have.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.

virtual int XrdCephOss::Unlink ( const char *  path,
int  Opts = 0,
XrdOucEnv envP = 0 
) [virtual]

Remove a file.

Parameters:
path - Pointer to the path of the file to be removed.
opts - Options: XRDOSS_isMIG - this is a migratable path. XRDOSS_isPFN - do not apply name2name to path. XRDOSS_Online - remove only the online copy.
envP - Pointer to environmental information.
Returns:
0 upon success or -errno or -osserr (see XrdOssError.hh).

Implements XrdOss.


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