XRootD
Loading...
Searching...
No Matches
XrdOssHandler Class Reference

#include <XrdOssHandler.hh>

+ Inheritance diagram for XrdOssHandler:
+ Collaboration diagram for XrdOssHandler:

Public Member Functions

 XrdOssHandler (XrdOss *successor)
 
virtual ~XrdOssHandler ()
 
virtual int Chmod (const char *path, mode_t mode, XrdOucEnv *envP=0)
 
virtual void Connect (XrdOucEnv &env)
 
virtual int Create (const char *tident, const char *path, mode_t access_mode, XrdOucEnv &env, int Opts=0)
 
virtual void Disc (XrdOucEnv &env)
 
virtual void EnvInfo (XrdOucEnv *envP)
 
virtual uint64_t Features ()
 
virtual int FSctl (int cmd, int alen, const char *args, char **resp=0)
 
virtual int Lfn2Pfn (const char *Path, char *buff, int blen)
 
virtual const char * Lfn2Pfn (const char *Path, char *buff, int blen, int &rc)
 
virtual int Mkdir (const char *path, mode_t mode, int mkpath=0, XrdOucEnv *envP=0)
 
virtual int Reloc (const char *tident, const char *path, const char *cgName, const char *anchor=0)
 
virtual int Remdir (const char *path, int Opts=0, XrdOucEnv *eP=0)
 
virtual int Rename (const char *oldname, const char *newname, XrdOucEnv *old_env=0, XrdOucEnv *new_env=0)
 
virtual int Stat (const char *path, struct stat *buff, int opts=0, XrdOucEnv *EnvP=0)
 
virtual int StatFS (const char *path, char *buff, int &blen, XrdOucEnv *eP=0)
 
virtual int StatLS (XrdOucEnv &env, const char *cgrp, char *buff, int &blen)
 
virtual int StatPF (const char *path, struct stat *buff)
 
virtual int StatPF (const char *path, struct stat *buff, int opts)
 
virtual int Stats (char *bp, int bl)
 
virtual int StatVS (XrdOssVSInfo *sP, const char *sname=0, int updt=0)
 
virtual int StatXA (const char *path, char *buff, int &blen, XrdOucEnv *eP=0)
 
virtual int StatXP (const char *path, unsigned long long &attr, XrdOucEnv *eP=0)
 
virtual int Truncate (const char *path, unsigned long long size, XrdOucEnv *envP=0)
 
virtual int Unlink (const char *path, int Opts=0, XrdOucEnv *eP=0)
 
- Public Member Functions inherited from XrdOss
 XrdOss ()
 Constructor and Destructor.
 
virtual ~XrdOss ()
 
virtual int Init (XrdSysLogger *lp, const char *cfn)=0
 
virtual int Init (XrdSysLogger *lp, const char *cfn, XrdOucEnv *envP)
 
virtual XrdOssDFnewDir (const char *tident)=0
 
virtual XrdOssDFnewFile (const char *tident)=0
 

Protected Attributes

XrdOsssuccessor_
 

Additional Inherited Members

- Static Public Attributes inherited from XrdOss
static const int PF_csVer = 0x00000001
 verified file checksums present
 
static const int PF_csVun = 0x00000002
 unverified file checksums present
 
static const int PF_dInfo = 0x00000001
 
static const int PF_dNums = 0x00000002
 
static const int PF_dStat = 0x00000008
 
static const int PF_isLFN = 0x00000004
 

Detailed Description

Definition at line 84 of file XrdOssHandler.hh.

Constructor & Destructor Documentation

◆ XrdOssHandler()

XrdOssHandler::XrdOssHandler ( XrdOss * successor)
inline

Definition at line 137 of file XrdOssHandler.hh.

137: successor_(successor) { }
XrdOss * successor_

References XrdOss::XrdOss(), and successor_.

Referenced by XrdOssCsi::XrdOssCsi().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~XrdOssHandler()

virtual XrdOssHandler::~XrdOssHandler ( )
inlinevirtual

Definition at line 138 of file XrdOssHandler.hh.

138{ }

Member Function Documentation

◆ Chmod()

virtual int XrdOssHandler::Chmod ( const char * path,
mode_t mode,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 90 of file XrdOssHandler.hh.

90{ return successor_->Chmod(path, mode, envP); }

References successor_.

◆ Connect()

virtual void XrdOssHandler::Connect ( XrdOucEnv & env)
inlinevirtual

Notify storage system that a client has connected.

Parameters
env- Reference to environmental information.

Reimplemented from XrdOss.

Definition at line 92 of file XrdOssHandler.hh.

92{ successor_->Connect(env); }

References successor_.

◆ Create()

virtual int XrdOssHandler::Create ( const char * tid,
const char * path,
mode_t mode,
XrdOucEnv & env,
int opts = 0 )
inlinevirtual

Create file.

Parameters
tid- Pointer to the trace identifier.
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.

Reimplemented in XrdOssCsi.

Definition at line 94 of file XrdOssHandler.hh.

95 { return successor_->Create(tident, path, access_mode, env, Opts); }
#define tident

References successor_, and tident.

◆ Disc()

virtual void XrdOssHandler::Disc ( XrdOucEnv & env)
inlinevirtual

Notify storage system that a client has disconnected.

Parameters
env- Reference to environmental information.

Reimplemented from XrdOss.

Definition at line 97 of file XrdOssHandler.hh.

97{ successor_->Disc(env); }

References successor_.

◆ EnvInfo()

virtual void XrdOssHandler::EnvInfo ( XrdOucEnv * envP)
inlinevirtual

Notify storage system of initialization information (deprecated).

Parameters
envP- Pointer to environmental information.

Reimplemented from XrdOss.

Definition at line 98 of file XrdOssHandler.hh.

98{ successor_->EnvInfo(envP); }

References successor_.

◆ Features()

virtual uint64_t XrdOssHandler::Features ( )
inlinevirtual

Return storage system features.

Returns
Storage system features (see XRDOSS_HASxxx flags).

Reimplemented from XrdOss.

Reimplemented in XrdOssCsi.

Definition at line 99 of file XrdOssHandler.hh.

99{ return successor_->Features(); }

References successor_.

◆ FSctl()

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

Execute a special storage system operation.

Parameters
cmd- The operation to be performed: XRDOSS_FSCTLFA - Perform proxy file attribute operation
alen- Length of data pointed to by args.
args- Data sent with request, zero if alen is zero.
resp- Where the response is to be set, if any.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 100 of file XrdOssHandler.hh.

100{ return successor_->FSctl(cmd, alen, args, resp); }

References successor_.

◆ Lfn2Pfn() [1/2]

virtual int XrdOssHandler::Lfn2Pfn ( const char * Path,
char * buff,
int blen )
inlinevirtual

Translate logical name to physical name V1 (deprecated).

Parameters
Path- Path in whose information is wanted.
buff- Pointer to the buffer to hold the new path.
blen- Length of the buffer.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 132 of file XrdOssHandler.hh.

132{ return successor_->Lfn2Pfn(Path, buff, blen); }
XrdOucString Path

References Path, and successor_.

◆ Lfn2Pfn() [2/2]

virtual const char * XrdOssHandler::Lfn2Pfn ( const char * Path,
char * buff,
int blen,
int & rc )
inlinevirtual

Translate logical name to physical name V2.

Parameters
Path- Path in whose information is wanted.
buff- Pointer to the buffer to hold the new path.
blen- Length of the buffer.
rc- Place where failure return code is to be returned: -errno or -osserr (see XrdOssError.hh).
Returns
Pointer to the translated path upon success or nil on failure.

Reimplemented from XrdOss.

Definition at line 135 of file XrdOssHandler.hh.

135{ return successor_->Lfn2Pfn(Path, buff, blen, rc); }

References Path, and successor_.

◆ Mkdir()

virtual int XrdOssHandler::Mkdir ( const char * path,
mode_t mode,
int mkpath = 0,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 105 of file XrdOssHandler.hh.

105{ return successor_->Mkdir(path, mode, mkpath, envP); }

References successor_.

◆ Reloc()

virtual int XrdOssHandler::Reloc ( const char * tident,
const char * path,
const char * cgName,
const char * anchor = 0 )
inlinevirtual

Relocate/Copy the file at ‘path’ to a new location.

Parameters
tident- -> trace identifier for this operation.
path- -> fully qualified name of the file to relocate.
cgName- -> target space name[:path]
anchor- Processing directions (see XrdOssReloc.cc example).
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Reimplemented in XrdOssCsi.

Definition at line 107 of file XrdOssHandler.hh.

108 { return successor_->Reloc(tident, path, cgName, anchor); }

References successor_, and tident.

◆ Remdir()

virtual int XrdOssHandler::Remdir ( const char * path,
int Opts = 0,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 110 of file XrdOssHandler.hh.

110{ return successor_->Remdir(path, Opts, eP); }

References successor_.

◆ Rename()

virtual int XrdOssHandler::Rename ( const char * oPath,
const char * nPath,
XrdOucEnv * oEnvP = 0,
XrdOucEnv * nEnvP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 111 of file XrdOssHandler.hh.

112 { return successor_->Rename(oldname, newname, old_env, new_env); }

References successor_.

◆ Stat()

virtual int XrdOssHandler::Stat ( const char * path,
struct stat * buff,
int opts = 0,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 113 of file XrdOssHandler.hh.

114 { return successor_->Stat(path, buff, opts, EnvP); }
struct myOpts opts

References opts, stat, and successor_.

◆ StatFS()

virtual int XrdOssHandler::StatFS ( const char * path,
char * buff,
int & blen,
XrdOucEnv * envP = 0 )
inlinevirtual

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().
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.

Definition at line 119 of file XrdOssHandler.hh.

119{ return successor_->StatFS(path, buff, blen, eP); }

References successor_.

◆ StatLS()

virtual int XrdOssHandler::StatLS ( XrdOucEnv & env,
const char * path,
char * buff,
int & blen )
inlinevirtual

Return filesystem physical space information associated with a space name.

Parameters
env- Ref to environmental information. If the environment has the key oss.cgroup defined, the associated value is used as the space name and the path is ignored.
path- Path in the name space in question. The space name associated with gthe path is used unless overridden.
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().
Returns
"oss.cgroup=<name>&oss.space=<totbytes>&oss.free=<freebytes> &oss.maxf=<maxcontigbytes>&oss.used=<bytesused> &oss.quota=<quotabytes>" in buff upon success. Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

Definition at line 120 of file XrdOssHandler.hh.

120{ return successor_->StatLS(env, cgrp, buff, blen); }

References successor_.

◆ StatPF() [1/2]

virtual int XrdOssHandler::StatPF ( const char * path,
struct stat * buff )
inlinevirtual

Reimplemented from XrdOss.

Reimplemented in XrdOssCsi.

Definition at line 122 of file XrdOssHandler.hh.

122{ return successor_->StatPF(path, buff); }

References stat, and successor_.

◆ StatPF() [2/2]

virtual int XrdOssHandler::StatPF ( const char * path,
struct stat * buff,
int opts )
inlinevirtual

Reimplemented from XrdOss.

Reimplemented in XrdOssCsi.

Definition at line 121 of file XrdOssHandler.hh.

121{ return successor_->StatPF(path, buff, opts); }

References opts, stat, and successor_.

◆ Stats()

virtual int XrdOssHandler::Stats ( char * buff,
int blen )
inlinevirtual

Return statistics.

Parameters
buff- Pointer to the buffer to hold statistics.
blen- Length of the buffer.
Returns
The number of bytes placed in the buffer excluding null byte.

Reimplemented from XrdOss.

Definition at line 116 of file XrdOssHandler.hh.

116{ return successor_->Stats(bp, bl); }

References successor_.

◆ StatVS()

virtual int XrdOssHandler::StatVS ( XrdOssVSInfo * vsP,
const char * sname = 0,
int updt = 0 )
inlinevirtual

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.

Definition at line 123 of file XrdOssHandler.hh.

123{ return successor_->StatVS(sP, sname, updt); }

References successor_.

◆ StatXA()

virtual int XrdOssHandler::StatXA ( const char * path,
char * buff,
int & blen,
XrdOucEnv * envP = 0 )
inlinevirtual

Return logical extended attributes associated with a path.

Parameters
path- Path in whose information is wanted.
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().
envP- Pointer to environmental information.
Returns
"oss.cgroup=<name>&oss.type={'f'|'d'|'o'}&oss.used=<totbytes> &oss.mt=<mtime>&oss.ct=<ctime>&oss.at=<atime>&oss.u=*&oss.g=* &oss.fs={'w'|'r'}" Upon failure -errno or -osserr (see XrdOssError.hh) returned.

Reimplemented from XrdOss.

Reimplemented in XrdOssCsi.

Definition at line 124 of file XrdOssHandler.hh.

124{ return successor_->StatXA(path, buff, blen, eP); }

References successor_.

◆ StatXP()

virtual int XrdOssHandler::StatXP ( const char * path,
unsigned long long & attr,
XrdOucEnv * envP = 0 )
inlinevirtual

Return export attributes associated with a path.

Parameters
path- Path in whose information is wanted.
attr- Reference to where the inforamation is to be stored.
envP- Pointer to environmental information.
Returns
0 upon success or -errno or -osserr (see XrdOssError.hh).

Reimplemented from XrdOss.

Definition at line 125 of file XrdOssHandler.hh.

125{ return successor_->StatXP(path, attr, eP); }

References successor_.

◆ Truncate()

virtual int XrdOssHandler::Truncate ( const char * path,
unsigned long long fsize,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 127 of file XrdOssHandler.hh.

128 { return successor_->Truncate(path, size, envP); }

References successor_.

◆ Unlink()

virtual int XrdOssHandler::Unlink ( const char * path,
int Opts = 0,
XrdOucEnv * envP = 0 )
inlinevirtual

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.

Reimplemented in XrdOssCsi.

Definition at line 129 of file XrdOssHandler.hh.

129{ return successor_->Unlink(path, Opts, eP); }

References successor_.

Member Data Documentation

◆ successor_


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