xrootd
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
XrdSfsFileSystem Class Referenceabstract

#include <XrdSfsInterface.hh>

Inheritance diagram for XrdSfsFileSystem:
Inheritance graph
[legend]

Public Types

enum  csFunc { csCalc = 0 , csGet , csSize }
 
enum  gpfFunc { gpfCancel =0 , gpfGet , gpfPut }
 

Public Member Functions

virtual XrdSfsDirectorynewDir (char *user=0, int MonID=0)=0
 
virtual XrdSfsDirectorynewDir (XrdOucErrInfo &eInfo)
 
virtual XrdSfsFilenewFile (char *user=0, int MonID=0)=0
 
virtual XrdSfsFilenewFile (XrdOucErrInfo &eInfo)
 
virtual int chksum (csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
 
virtual int chmod (const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual void Connect (const XrdSecEntity *client=0)
 
virtual void Disc (const XrdSecEntity *client=0)
 
virtual void EnvInfo (XrdOucEnv *envP)
 
virtual int exists (const char *path, XrdSfsFileExistence &eFlag, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int FAttr (XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
uint64_t Features ()
 
virtual int FSctl (const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual int fsctl (const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0
 
virtual int getChkPSize ()
 
virtual int getStats (char *buff, int blen)=0
 
virtual const char * getVersion ()=0
 
virtual int gpFile (gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual int mkdir (const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int prepare (XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0
 
virtual int rem (const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int remdir (const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int rename (const char *oPath, const char *nPath, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaqueO=0, const char *opaqueN=0)=0
 
virtual int stat (const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int stat (const char *path, mode_t &mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
virtual int truncate (const char *path, XrdSfsFileOffset fsize, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
 
 XrdSfsFileSystem ()
 Constructor and Destructor.
 
virtual ~XrdSfsFileSystem ()
 

Protected Attributes

uint64_t FeatureSet
 Adjust features at initialization.
 

Detailed Description

Common parameters: Many of the methods have certain common parameters. These are documented here to avoid lengthy duplicate descriptions.

Parameters
eInfo- The object where error info or results are to be returned. For errors, you should return information as follows: SFS_OK eInfo may contain results, as described in specified method description that follows. SFS_ERROR eInfo.code - errno number eInfo.message - error message text SFS_REDIRECT eInfo.code - target port number eInfo.message - target host address/name SFS_STALL eInfo.code - expected seconds to stall eInfo.message - reason for the delay SFS_STARTED eInfo.code - expected seconds to completion eInfo.message - reason for the delay SFS_DATA eInfo.code - length of data in message eInfo.message - the request data
client- Pointer to the client's identity information or nil if the identity is not known.
opaque- Pointer to the CGI information associated with Path or nil if there is no opaque information.

Member Enumeration Documentation

◆ csFunc

Obtain checksum information for a file.

Parameters
Func- The checksum operation to be performed: csCalc - (re)calculate and return the checksum value csGet - return the existing checksum value, if any csSize - return the size of the checksum value that corresponds to csName (path may be null).
csName- The name of the checksum value wanted.
path- Pointer to the path of the file in question.
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, or SFS_REDIRECT. When SFS_OK is returned, eInfo should contain results, as follows: csCalc/csGet eInfo.message - null terminated string with the checksum value in ASCII hex. csSize eInfo.code - size of binary checksum value.
Enumerator
csCalc 
csGet 
csSize 

◆ gpfFunc

Perform a third party file transfer or cancel one.

Parameters
gpAct- What to do as one of the enums listed below.
gpReq- reference tothe object describing the request. This object is also used communicate the request status.
eInfo- The object where error info or results are to be returned.
client- Client's identify (see common description).
Returns
SFS_OK Request accepted (same as SFS_STARTED). Otherwise, one of SFS_ERROR, SFS_REDIRECT, or SFS_STALL.
Enumerator
gpfCancel 

Cancel this request.

gpfGet 

Perform a file retrieval.

gpfPut 

Perform a file push.

Constructor & Destructor Documentation

◆ XrdSfsFileSystem()

XrdSfsFileSystem::XrdSfsFileSystem ( )

Constructor and Destructor.

◆ ~XrdSfsFileSystem()

virtual XrdSfsFileSystem::~XrdSfsFileSystem ( )
inlinevirtual

Member Function Documentation

◆ chksum()

virtual int XrdSfsFileSystem::chksum ( csFunc  Func,
const char *  csName,
const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
virtual

Reimplemented in XrdSsiSfs, XrdThrottle::FileSystem, and XrdOfs.

◆ chmod()

virtual int XrdSfsFileSystem::chmod ( const char *  path,
XrdSfsMode  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure 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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ Connect()

virtual void XrdSfsFileSystem::Connect ( const XrdSecEntity client = 0)
inlinevirtual

Notify filesystem that a client has connected.

Parameters
client- Client's identify (see common description).

Reimplemented in XrdOfs, and XrdThrottle::FileSystem.

◆ Disc()

virtual void XrdSfsFileSystem::Disc ( const XrdSecEntity client = 0)
inlinevirtual

Notify filesystem that a client has disconnected.

Parameters
client- Client's identify (see common description).

Reimplemented in XrdOfs, and XrdThrottle::FileSystem.

◆ EnvInfo()

virtual void XrdSfsFileSystem::EnvInfo ( XrdOucEnv envP)
inlinevirtual

Notify filesystem about implmentation dependent environment. This method may be called only once, if at all, right after obtaining this object.

Parameters
envP- Pointer to environmental information.

Reimplemented in XrdThrottle::FileSystem.

◆ exists()

virtual int XrdSfsFileSystem::exists ( const char *  path,
XrdSfsFileExistence eFlag,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure 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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ FAttr()

virtual int XrdSfsFileSystem::FAttr ( XrdSfsFACtl faReq,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
virtual

Perform a filesystem extended attribute function.

Parameters
faReq- pointer to the request object (see XrdSfsFAttr.hh). If the pointer is nill, simply return whether or not extended attributes are supported.
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.
SFS_STARTED Operation started result will be returned via callback. o/w one of SFS_ERROR, SFS_REDIRECT, or SFS_STALL.

Reimplemented in XrdOfs, and XrdThrottle::FileSystem.

◆ Features()

uint64_t XrdSfsFileSystem::Features ( )
inline

Obtain file system feature set.

Returns
The bit-wise feature set (i.e. supported or configured). See include file XrdSfsFlags.hh for actual bit values.

References FeatureSet.

◆ fsctl()

virtual int XrdSfsFileSystem::fsctl ( const int  cmd,
const char *  args,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
pure virtual

Perform a filesystem control operation (version 1)

Parameters
cmd- The operation to be performed: SFS_FSCTL_LOCATE Locate a file or file servers SFS_FSCTL_STATCC Return cluster config status SFS_FSCTL_STATFS Return physical filesystem information SFS_FSCTL_STATLS Return logical filesystem information SFS_FSCTL_STATXA Return extended attributes
args- Arguments specific to cmd. SFS_FSCTL_LOCATE args points to the path to be located "" path is the first exported path "*" return all current servers "*&zwj;/" return servers exporting path o/w return servers having the path SFS_FSCTL_STATFS Path in the filesystem in question. SFS_FSCTL_STATLS Path in the filesystem in question. SFS_FSCTL_STATXA Path of the file whose xattr is wanted.
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.
SFS_STARTED Operation started result will be returned via callback. Valid only for for SFS_FSCTL_LOCATE, SFS_FSCTL_STATFS, and SFS_FSCTL_STATXA o/w one of SFS_ERROR, SFS_REDIRECT, or SFS_STALL.

Implemented in XrdSsiSfs, XrdBwm, XrdThrottle::FileSystem, and XrdOfs.

◆ FSctl()

virtual int XrdSfsFileSystem::FSctl ( const int  cmd,
XrdSfsFSctl args,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
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.

Reimplemented in XrdOfs.

◆ getChkPSize()

virtual int XrdSfsFileSystem::getChkPSize ( )
inlinevirtual

Return maximum checkpoint size.

Returns
Maximum size of a checkpoint.

Reimplemented in XrdThrottle::FileSystem.

◆ getStats()

virtual int XrdSfsFileSystem::getStats ( char *  buff,
int  blen 
)
pure 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.

Implemented in XrdBwm, XrdDigFS, XrdOfs, XrdSfsNative, XrdSsiSfs, and XrdThrottle::FileSystem.

◆ getVersion()

virtual const char * XrdSfsFileSystem::getVersion ( )
pure virtual

Get version string.

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

Implemented in XrdBwm, XrdDigFS, XrdOfs, XrdSfsNative, XrdSsiSfs, and XrdThrottle::FileSystem.

◆ gpFile()

virtual int XrdSfsFileSystem::gpFile ( gpfFunc gpAct,
XrdSfsGPFile gpReq,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
virtual

Reimplemented in XrdThrottle::FileSystem.

◆ mkdir()

virtual int XrdSfsFileSystem::mkdir ( const char *  path,
XrdSfsMode  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure 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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ newDir() [1/2]

virtual XrdSfsDirectory * XrdSfsFileSystem::newDir ( char *  user = 0,
int  MonID = 0 
)
pure virtual

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.

Implemented in XrdBwm, XrdDigFS, XrdOfs, XrdSfsNative, XrdSsiSfs, and XrdThrottle::FileSystem.

◆ newDir() [2/2]

virtual XrdSfsDirectory * XrdSfsFileSystem::newDir ( XrdOucErrInfo eInfo)
inlinevirtual

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

Parameters
eInfo- Reference to the error object to be used by the new directory object. Note that an implementation is supplied for compatibility purposes but it returns a nil pointer which is considered to be a failure. You must supply an implementation for this to work correctly.
Returns
pointer- Pointer to an XrdSfsDirectory object.
nil - Insufficient memory to allocate an object.

Reimplemented in XrdOfs.

◆ newFile() [1/2]

virtual XrdSfsFile * XrdSfsFileSystem::newFile ( char *  user = 0,
int  MonID = 0 
)
pure virtual

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.

Implemented in XrdBwm, XrdDigFS, XrdOfs, XrdSfsNative, XrdSsiSfs, and XrdThrottle::FileSystem.

◆ newFile() [2/2]

virtual XrdSfsFile * XrdSfsFileSystem::newFile ( XrdOucErrInfo eInfo)
inlinevirtual

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

Parameters
eInfo- Reference to the error object to be used by the new file object. Note that an implementation is supplied for compatibility purposes but it returns a nil pointer which is considered to be a failure. You must supply an implementation for this to work correctly.
Returns
pointer- Pointer to an XrdSfsFile object.
nil - Insufficient memory to allocate an object.

Reimplemented in XrdOfs.

◆ prepare()

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

Prepare 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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ rem()

virtual int XrdSfsFileSystem::rem ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure virtual

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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ remdir()

virtual int XrdSfsFileSystem::remdir ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure virtual

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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ rename()

virtual int XrdSfsFileSystem::rename ( const char *  oPath,
const char *  nPath,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaqueO = 0,
const char *  opaqueN = 0 
)
pure 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

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ stat() [1/2]

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

Return state information on a file or directory.

Parameters
Name- 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.

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ stat() [2/2]

virtual int XrdSfsFileSystem::stat ( const char *  path,
mode_t &  mode,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure 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.

Implemented in XrdSsiSfs, XrdBwm, XrdOfs, and XrdThrottle::FileSystem.

◆ truncate()

virtual int XrdSfsFileSystem::truncate ( const char *  path,
XrdSfsFileOffset  fsize,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
pure 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

Implemented in XrdSsiSfs, XrdBwm, XrdDigFS, XrdOfs, XrdSfsNative, and XrdThrottle::FileSystem.

Member Data Documentation

◆ FeatureSet

uint64_t XrdSfsFileSystem::FeatureSet
protected

Adjust features at initialization.

Referenced by Features().


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