xrootd
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XrdOfs Class Reference

#include <XrdOfs.hh>

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

Classes

struct  fwdOpt
 

Public Types

enum  {
  Authorize = 0x0001, XAttrPlug = 0x0002, isPeer = 0x0050, isProxy = 0x0020,
  isManager = 0x0040, isServer = 0x0080, isSuper = 0x00C0, isMeta = 0x0100,
  haveRole = 0x01F0, Forwarding = 0x1000, ThirdPC = 0x2000, SubCluster = 0x4000
}
 
- Public Types inherited from XrdSfsFileSystem
enum  csFunc { csCalc = 0, csGet, csSize }
 

Public Member Functions

XrdSfsDirectorynewDir (char *user=0, int MonID=0)
 
XrdSfsFilenewFile (char *user=0, int MonID=0)
 
int chksum (csFunc Func, const char *csName, const char *Path, XrdOucErrInfo &out_error, const XrdSecEntity *client=0, const char *opaque=0)
 
int chmod (const char *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int exists (const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int fsctl (const int cmd, const char *args, XrdOucErrInfo &out_error, const XrdSecEntity *client)
 
int getStats (char *buff, int blen)
 
const char * getVersion ()
 
int mkdir (const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int prepare (XrdSfsPrep &pargs, XrdOucErrInfo &out_error, const XrdSecEntity *client=0)
 
int rem (const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
int remdir (const char *dirName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
int rename (const char *oldFileName, const char *newFileName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0)
 
int stat (const char *Name, struct stat *buf, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int stat (const char *Name, mode_t &mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int truncate (const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &out_error, const XrdSecEntity *client=0, const char *opaque=0)
 
virtual int Configure (XrdSysError &)
 
virtual int Configure (XrdSysError &, XrdOucEnv *)
 
void Config_Cluster (XrdOss *)
 
void Config_Display (XrdSysError &)
 
 XrdOfs ()
 
virtual ~XrdOfs ()
 
- Public Member Functions inherited from XrdSfsFileSystem
virtual void Disc (const XrdSecEntity *client=0)
 
virtual void EnvInfo (XrdOucEnv *envP)
 
virtual int FSctl (const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
 XrdSfsFileSystem ()
 Constructor and Destructor. More...
 
virtual ~XrdSfsFileSystem ()
 

Public Attributes

int Options
 
int myPort
 
char * tpcRdrHost [2]
 
int tpcRdrPort [2]
 
XrdNetIFmyIF
 
struct fwdOpt fwdCHMOD
 
struct fwdOpt fwdMKDIR
 
struct fwdOpt fwdMKPATH
 
struct fwdOpt fwdMV
 
struct fwdOpt fwdRM
 
struct fwdOpt fwdRMDIR
 
struct fwdOpt fwdTRUNC
 
char * ConfigFN
 

Static Public Attributes

static int MaxDelay
 
static int OSSDelay
 

Protected Member Functions

virtual int ConfigXeq (char *var, XrdOucStream &, XrdSysError &)
 
const char * Split (const char *Args, const char **Opq, char *Path, int Plen)
 
int Stall (XrdOucErrInfo &, int, const char *)
 
void Unpersist (XrdOfsHandle *hP, int xcev=1)
 
char * WaitTime (int, char *, int)
 

Static Protected Member Functions

static int Emsg (const char *, XrdOucErrInfo &, int, const char *x, XrdOfsHandle *hP)
 
static int Emsg (const char *, XrdOucErrInfo &, int, const char *x, const char *y="")
 
static int fsError (XrdOucErrInfo &myError, int rc)
 

Protected Attributes

XrdOfsEvr evrObject
 
XrdCmsClientFinder
 

Private Member Functions

int remove (const char type, const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque)
 
int ConfigDispFwd (char *buff, struct fwdOpt &Fwd)
 
int ConfigPosc (XrdSysError &Eroute)
 
int ConfigRedir (XrdSysError &Eroute, XrdOucEnv *EnvInfo)
 
int ConfigTPC (XrdSysError &Eroute)
 
char * ConfigTPCDir (XrdSysError &Eroute, const char *xPath)
 
const char * Fname (const char *)
 
int Forward (int &Result, XrdOucErrInfo &Resp, struct fwdOpt &Fwd, const char *arg1=0, const char *arg2=0, XrdOucEnv *Env1=0, XrdOucEnv *Env2=0)
 
int Reformat (XrdOucErrInfo &)
 
const char * theRole (int opts)
 
int xcrds (XrdOucStream &, XrdSysError &)
 
int xdirl (XrdOucStream &, XrdSysError &)
 
int xexp (XrdOucStream &, XrdSysError &, bool)
 
int xforward (XrdOucStream &, XrdSysError &)
 
int xmaxd (XrdOucStream &, XrdSysError &)
 
int xnmsg (XrdOucStream &, XrdSysError &)
 
int xnot (XrdOucStream &, XrdSysError &)
 
int xpers (XrdOucStream &, XrdSysError &)
 
int xrole (XrdOucStream &, XrdSysError &)
 
int xtpc (XrdOucStream &, XrdSysError &)
 
int xtpcal (XrdOucStream &, XrdSysError &)
 
int xtpcr (XrdOucStream &, XrdSysError &)
 
int xtrace (XrdOucStream &, XrdSysError &)
 

Private Attributes

char * myRole
 
XrdAccAuthorizeAuthorization
 
XrdCmsClientBalancer
 
XrdOfsEvsevsObject
 
XrdOfsPoscqposcQ
 
char * poscLog
 
int poscHold
 
short poscSync
 
signed char poscAuto
 
char ossRW
 
XrdOfsConfigPIofsConfig
 
XrdOfsPrepareprepHandler
 
XrdCksCks
 
bool CksPfn
 
bool CksRdr
 
bool prepAuth
 
char OssIsProxy
 
char myRType [4]
 
XrdVersionInfo * myVersion
 
XrdSysMutex ocMutex
 
bool DirRdr
 

Static Private Attributes

static XrdOfsHandledummyHandle
 

Friends

class XrdOfsDirectory
 
class XrdOfsFile
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
Authorize 
XAttrPlug 
isPeer 
isProxy 
isManager 
isServer 
isSuper 
isMeta 
haveRole 
Forwarding 
ThirdPC 
SubCluster 

Constructor & Destructor Documentation

◆ XrdOfs()

XrdOfs::XrdOfs ( )

◆ ~XrdOfs()

virtual XrdOfs::~XrdOfs ( )
inlinevirtual

Member Function Documentation

◆ chksum()

int XrdOfs::chksum ( csFunc  Func,
const char *  csName,
const char *  Path,
XrdOucErrInfo out_error,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
virtual

Reimplemented from XrdSfsFileSystem.

◆ chmod()

int XrdOfs::chmod ( const char *  path,
XrdSfsMode  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
virtual

Change file mode settings.

Parameters
path- Pointer to the path of the file in question.
mode- The new file mode setting.
eInfo- The object where error info or results are to be returned.
client- Client's identify (see common description).
opaque- Path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT or SFS_STALL

Implements XrdSfsFileSystem.

◆ Config_Cluster()

void XrdOfs::Config_Cluster ( XrdOss )

◆ Config_Display()

void XrdOfs::Config_Display ( XrdSysError )

◆ ConfigDispFwd()

int XrdOfs::ConfigDispFwd ( char *  buff,
struct fwdOpt Fwd 
)
private

◆ ConfigPosc()

int XrdOfs::ConfigPosc ( XrdSysError Eroute)
private

◆ ConfigRedir()

int XrdOfs::ConfigRedir ( XrdSysError Eroute,
XrdOucEnv EnvInfo 
)
private

◆ ConfigTPC()

int XrdOfs::ConfigTPC ( XrdSysError Eroute)
private

◆ ConfigTPCDir()

char* XrdOfs::ConfigTPCDir ( XrdSysError Eroute,
const char *  xPath 
)
private

◆ Configure() [1/2]

virtual int XrdOfs::Configure ( XrdSysError )
virtual

◆ Configure() [2/2]

virtual int XrdOfs::Configure ( XrdSysError ,
XrdOucEnv  
)
virtual

◆ ConfigXeq()

virtual int XrdOfs::ConfigXeq ( char *  var,
XrdOucStream ,
XrdSysError  
)
protectedvirtual

◆ Emsg() [1/2]

static int XrdOfs::Emsg ( const char *  ,
XrdOucErrInfo ,
int  ,
const char *  x,
const char *  y = "" 
)
staticprotected

◆ Emsg() [2/2]

static int XrdOfs::Emsg ( const char *  ,
XrdOucErrInfo ,
int  ,
const char *  x,
XrdOfsHandle hP 
)
staticprotected

◆ exists()

int XrdOfs::exists ( const char *  path,
XrdSfsFileExistence eFlag,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
virtual

Return directory/file existence information (short stat).

Parameters
path- Pointer to the path of the file/directory in question.
eFlag- Where the results are to be returned.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- Path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, SFS_STALL, or SFS_STARTED When SFS_OK is returned, eFlag must be properly set, as follows: XrdSfsFileExistNo - path does not exist XrdSfsFileExistIsFile - path refers to an online file XrdSfsFileExistIsDirectory - path refers to an online directory XrdSfsFileExistIsOffline - path refers to an offline file XrdSfsFileExistIsOther - path is neither a file nor directory

Implements XrdSfsFileSystem.

◆ Fname()

const char* XrdOfs::Fname ( const char *  )
private

◆ Forward()

int XrdOfs::Forward ( int &  Result,
XrdOucErrInfo Resp,
struct fwdOpt Fwd,
const char *  arg1 = 0,
const char *  arg2 = 0,
XrdOucEnv Env1 = 0,
XrdOucEnv Env2 = 0 
)
private

◆ fsctl()

int XrdOfs::fsctl ( const int  cmd,
const char *  args,
XrdOucErrInfo eInfo,
const XrdSecEntity client 
)
virtual

Perform a filesystem control operation (version 2)

Parameters
cmd- The operation to be performed: SFS_FSCTL_PLUGIN Return Implementation Dependent Data v1 SFS_FSCTL_PLUGIO Return Implementation Dependent Data v2
args- Arguments specific to cmd. SFS_FSCTL_PLUGIN path and opaque information. SFS_FSCTL_PLUGIO Unscreened argument string.
eInfo- The object where error info or results are to be returned.
client- Client's identify (see common description).
Returns
SFS_OK a null response is sent. SFS_DATA error.code length of the data to be sent. error.message contains the data to be sent. o/w one of SFS_ERROR, SFS_REDIRECT, or SFS_STALL.

Implements XrdSfsFileSystem.

◆ fsError()

static int XrdOfs::fsError ( XrdOucErrInfo myError,
int  rc 
)
staticprotected

◆ getStats()

int XrdOfs::getStats ( char *  buff,
int  blen 
)
virtual

Return statistical information.

Parameters
buff- Pointer to the buffer where results are to be returned. Statistics should be in standard XML format. If buff is nil then only maximum size information is wanted.
blen- The length available in buff.
Returns
Number of bytes placed in buff. When buff is nil, the maximum number of bytes that could have been placed in buff.

Implements XrdSfsFileSystem.

◆ getVersion()

const char* XrdOfs::getVersion ( )
virtual

Get version string.

Returns
The version string. Normally this is the XrdVERSION value.

Implements XrdSfsFileSystem.

◆ mkdir()

int XrdOfs::mkdir ( const char *  path,
XrdSfsMode  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
virtual

Create a directory.

Parameters
path- Pointer to the path of the directory to be created.
mode- The directory mode setting.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- Path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

◆ newDir()

XrdSfsDirectory* XrdOfs::newDir ( char *  user = 0,
int  MonID = 0 
)
inlinevirtual

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

Parameters
user- Text identifying the client responsible for this call. The pointer may be null if identification is missing.
MonID- The monitoring identifier assigned to this and all future requests using the returned object.
Returns
pointer- Pointer to an XrdSfsDirectory object.
nil - Insufficient memory to allocate an object.

Implements XrdSfsFileSystem.

References XrdOfsDirectory.

◆ newFile()

XrdSfsFile* XrdOfs::newFile ( char *  user = 0,
int  MonID = 0 
)
inlinevirtual

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

Parameters
user- Text identifying the client responsible for this call. The pointer may be null if identification is missing.
MonID- The monitoring identifier assigned to this and all future requests using the returned object.
Returns
pointer- Pointer to an XrdSfsFile object.
nil - Insufficient memory to allocate an object.

Implements XrdSfsFileSystem.

References XrdOfsFile.

◆ prepare()

int XrdOfs::prepare ( XrdSfsPrep pargs,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
virtual

Preapre a file for future processing.

Parameters
pargs- The preapre arguments.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

◆ Reformat()

int XrdOfs::Reformat ( XrdOucErrInfo )
private

◆ rem()

int XrdOfs::rem ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
inlinevirtual

Remove a file.

Parameters
path- Pointer to the path of the file to be removed.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- Path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

References remove().

◆ remdir()

int XrdOfs::remdir ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
inlinevirtual

Remove a directory.

Parameters
path- Pointer to the path of the directory to be removed.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- Path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

References remove().

◆ remove()

int XrdOfs::remove ( const char  type,
const char *  path,
XrdOucErrInfo out_error,
const XrdSecEntity client,
const char *  opaque 
)
private

Referenced by rem(), and remdir().

◆ rename()

int XrdOfs::rename ( const char *  oPath,
const char *  nPath,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaqueO = 0,
const char *  opaqueN = 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.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaqueO- oPath's CGI information (see common description).
opaqueN- nPath's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

◆ Split()

const char* XrdOfs::Split ( const char *  Args,
const char **  Opq,
char *  Path,
int  Plen 
)
protected

◆ Stall()

int XrdOfs::Stall ( XrdOucErrInfo ,
int  ,
const char *   
)
protected

◆ stat() [1/2]

int XrdOfs::stat ( const char *  path,
mode_t &  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
virtual

Return mode information on a file or directory.

Parameters
path- Pointer to the path in question.
mode- Where full mode information is to be returned.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, SFS_STALL, or SFS_STARTED When SFS_OK is returned, mode must contain mode information. If teh mode is -1 then it is taken as an offline file.

Implements XrdSfsFileSystem.

◆ stat() [2/2]

int XrdOfs::stat ( const char *  Name,
struct stat *  buf,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
virtual

Return state information on a file or directory.

Parameters
path- Pointer to the path in question.
buf- Pointer to the structure where info it to be returned.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, SFS_STALL, or SFS_STARTED When SFS_OK is returned, buf must contain stat information.

Implements XrdSfsFileSystem.

◆ theRole()

const char* XrdOfs::theRole ( int  opts)
private

◆ truncate()

int XrdOfs::truncate ( const char *  path,
XrdSfsFileOffset  fsize,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 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.
eInfo- The object where error info is to be returned.
client- Client's identify (see common description).
opaque- path's CGI information (see common description).
Returns
One of SFS_OK, SFS_ERROR, SFS_REDIRECT, or SFS_STALL

Implements XrdSfsFileSystem.

◆ Unpersist()

void XrdOfs::Unpersist ( XrdOfsHandle hP,
int  xcev = 1 
)
protected

◆ WaitTime()

char* XrdOfs::WaitTime ( int  ,
char *  ,
int   
)
protected

◆ xcrds()

int XrdOfs::xcrds ( XrdOucStream ,
XrdSysError  
)
private

◆ xdirl()

int XrdOfs::xdirl ( XrdOucStream ,
XrdSysError  
)
private

◆ xexp()

int XrdOfs::xexp ( XrdOucStream ,
XrdSysError ,
bool   
)
private

◆ xforward()

int XrdOfs::xforward ( XrdOucStream ,
XrdSysError  
)
private

◆ xmaxd()

int XrdOfs::xmaxd ( XrdOucStream ,
XrdSysError  
)
private

◆ xnmsg()

int XrdOfs::xnmsg ( XrdOucStream ,
XrdSysError  
)
private

◆ xnot()

int XrdOfs::xnot ( XrdOucStream ,
XrdSysError  
)
private

◆ xpers()

int XrdOfs::xpers ( XrdOucStream ,
XrdSysError  
)
private

◆ xrole()

int XrdOfs::xrole ( XrdOucStream ,
XrdSysError  
)
private

◆ xtpc()

int XrdOfs::xtpc ( XrdOucStream ,
XrdSysError  
)
private

◆ xtpcal()

int XrdOfs::xtpcal ( XrdOucStream ,
XrdSysError  
)
private

◆ xtpcr()

int XrdOfs::xtpcr ( XrdOucStream ,
XrdSysError  
)
private

◆ xtrace()

int XrdOfs::xtrace ( XrdOucStream ,
XrdSysError  
)
private

Friends And Related Function Documentation

◆ XrdOfsDirectory

friend class XrdOfsDirectory
friend

Referenced by newDir().

◆ XrdOfsFile

friend class XrdOfsFile
friend

Referenced by newFile().

Member Data Documentation

◆ Authorization

XrdAccAuthorize* XrdOfs::Authorization
private

◆ Balancer

XrdCmsClient* XrdOfs::Balancer
private

◆ Cks

XrdCks* XrdOfs::Cks
private

◆ CksPfn

bool XrdOfs::CksPfn
private

◆ CksRdr

bool XrdOfs::CksRdr
private

◆ ConfigFN

char* XrdOfs::ConfigFN

◆ DirRdr

bool XrdOfs::DirRdr
private

◆ dummyHandle

XrdOfsHandle* XrdOfs::dummyHandle
staticprivate

◆ evrObject

XrdOfsEvr XrdOfs::evrObject
protected

◆ evsObject

XrdOfsEvs* XrdOfs::evsObject
private

◆ Finder

XrdCmsClient* XrdOfs::Finder
protected

◆ fwdCHMOD

struct fwdOpt XrdOfs::fwdCHMOD

◆ fwdMKDIR

struct fwdOpt XrdOfs::fwdMKDIR

◆ fwdMKPATH

struct fwdOpt XrdOfs::fwdMKPATH

◆ fwdMV

struct fwdOpt XrdOfs::fwdMV

◆ fwdRM

struct fwdOpt XrdOfs::fwdRM

◆ fwdRMDIR

struct fwdOpt XrdOfs::fwdRMDIR

◆ fwdTRUNC

struct fwdOpt XrdOfs::fwdTRUNC

◆ MaxDelay

int XrdOfs::MaxDelay
static

◆ myIF

XrdNetIF* XrdOfs::myIF

◆ myPort

int XrdOfs::myPort

◆ myRole

char* XrdOfs::myRole
private

◆ myRType

char XrdOfs::myRType[4]
private

◆ myVersion

XrdVersionInfo* XrdOfs::myVersion
private

◆ ocMutex

XrdSysMutex XrdOfs::ocMutex
private

◆ ofsConfig

XrdOfsConfigPI* XrdOfs::ofsConfig
private

◆ Options

int XrdOfs::Options

◆ OSSDelay

int XrdOfs::OSSDelay
static

◆ OssIsProxy

char XrdOfs::OssIsProxy
private

◆ ossRW

char XrdOfs::ossRW
private

◆ poscAuto

signed char XrdOfs::poscAuto
private

◆ poscHold

int XrdOfs::poscHold
private

◆ poscLog

char* XrdOfs::poscLog
private

◆ poscQ

XrdOfsPoscq* XrdOfs::poscQ
private

◆ poscSync

short XrdOfs::poscSync
private

◆ prepAuth

bool XrdOfs::prepAuth
private

◆ prepHandler

XrdOfsPrepare* XrdOfs::prepHandler
private

◆ tpcRdrHost

char* XrdOfs::tpcRdrHost[2]

◆ tpcRdrPort

int XrdOfs::tpcRdrPort[2]

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