xrootd
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
XrdThrottle::FileSystem Class Reference

#include <XrdThrottle.hh>

Inheritance diagram for XrdThrottle::FileSystem:
Inheritance graph
[legend]
Collaboration diagram for XrdThrottle::FileSystem:
Collaboration graph
[legend]

Public Member Functions

virtual XrdSfsDirectorynewDir (char *user=0, int monid=0)
 
virtual XrdSfsFilenewFile (char *user=0, int monid=0)
 
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 *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=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 *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int FAttr (XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual uint64_t Features ()
 
virtual int fsctl (const int cmd, const char *args, XrdOucErrInfo &out_error, const XrdSecEntity *client)
 
virtual int getChkPSize ()
 
virtual int getStats (char *buff, int blen)
 
virtual const char * getVersion ()
 
virtual int gpFile (gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual int mkdir (const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int prepare (XrdSfsPrep &pargs, XrdOucErrInfo &out_error, const XrdSecEntity *client=0)
 
virtual int rem (const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
virtual int remdir (const char *dirName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
virtual int rename (const char *oldFileName, const char *newFileName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0)
 
virtual int stat (const char *Name, struct stat *buf, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int stat (const char *Name, mode_t &mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int truncate (const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &out_error, const XrdSecEntity *client=0, const char *opaque=0)
 
virtual int Configure (XrdSysError &, XrdSfsFileSystem *native_fs)
 
- Public Member Functions inherited from XrdSfsFileSystem
virtual XrdSfsDirectorynewDir (XrdOucErrInfo &eInfo)
 
virtual XrdSfsFilenewFile (XrdOucErrInfo &eInfo)
 
uint64_t Features ()
 
virtual int FSctl (const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
 XrdSfsFileSystem ()
 Constructor and Destructor.
 
virtual ~XrdSfsFileSystem ()
 

Private Member Functions

 FileSystem ()
 
virtual ~FileSystem ()
 
int xthrottle (XrdOucStream &Config)
 
int xloadshed (XrdOucStream &Config)
 
int xtrace (XrdOucStream &Config)
 
int xmaxopen (XrdOucStream &Config)
 
int xmaxconn (XrdOucStream &Config)
 

Static Private Member Functions

static void Initialize (FileSystem *&fs, XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *config_file)
 

Private Attributes

XrdSysError m_eroute
 
XrdOucTrace m_trace
 
std::string m_config_file
 
XrdSfsFileSystemm_sfs_ptr
 
bool m_initialized
 
XrdThrottleManager m_throttle
 
XrdVersionInfo * myVersion
 

Static Private Attributes

static FileSystemm_instance
 

Friends

XrdSfsFileSystemXrdSfsGetFileSystem_Internal (XrdSfsFileSystem *, XrdSysLogger *, const char *)
 

Additional Inherited Members

- Public Types inherited from XrdSfsFileSystem
enum  csFunc { csCalc = 0 , csGet , csSize }
 
enum  gpfFunc { gpfCancel =0 , gpfGet , gpfPut }
 
- Protected Attributes inherited from XrdSfsFileSystem
uint64_t FeatureSet
 Adjust features at initialization.
 

Constructor & Destructor Documentation

◆ FileSystem()

XrdThrottle::FileSystem::FileSystem ( )
private

◆ ~FileSystem()

virtual XrdThrottle::FileSystem::~FileSystem ( )
privatevirtual

Member Function Documentation

◆ chksum()

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

Reimplemented from XrdSfsFileSystem.

◆ chmod()

virtual int XrdThrottle::FileSystem::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.

◆ Configure()

virtual int XrdThrottle::FileSystem::Configure ( XrdSysError ,
XrdSfsFileSystem native_fs 
)
virtual

◆ Connect()

virtual void XrdThrottle::FileSystem::Connect ( const XrdSecEntity client = 0)
virtual

Notify filesystem that a client has connected.

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

Reimplemented from XrdSfsFileSystem.

◆ Disc()

virtual void XrdThrottle::FileSystem::Disc ( const XrdSecEntity client = 0)
virtual

Notify filesystem that a client has disconnected.

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

Reimplemented from XrdSfsFileSystem.

◆ EnvInfo()

virtual void XrdThrottle::FileSystem::EnvInfo ( XrdOucEnv envP)
virtual

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 from XrdSfsFileSystem.

◆ exists()

virtual int XrdThrottle::FileSystem::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.

◆ FAttr()

virtual int XrdThrottle::FileSystem::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 from XrdSfsFileSystem.

◆ Features()

virtual uint64_t XrdThrottle::FileSystem::Features ( )
virtual

◆ fsctl()

virtual int XrdThrottle::FileSystem::fsctl ( const int  cmd,
const char *  args,
XrdOucErrInfo eInfo,
const XrdSecEntity client 
)
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.

Implements XrdSfsFileSystem.

◆ getChkPSize()

virtual int XrdThrottle::FileSystem::getChkPSize ( )
virtual

Return maximum checkpoint size.

Returns
Maximum size of a checkpoint.

Reimplemented from XrdSfsFileSystem.

◆ getStats()

virtual int XrdThrottle::FileSystem::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()

virtual const char * XrdThrottle::FileSystem::getVersion ( )
virtual

Get version string.

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

Implements XrdSfsFileSystem.

◆ gpFile()

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

Reimplemented from XrdSfsFileSystem.

◆ Initialize()

static void XrdThrottle::FileSystem::Initialize ( FileSystem *&  fs,
XrdSfsFileSystem native_fs,
XrdSysLogger lp,
const char *  config_file 
)
staticprivate

◆ mkdir()

virtual int XrdThrottle::FileSystem::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()

virtual XrdSfsDirectory * XrdThrottle::FileSystem::newDir ( char *  user = 0,
int  MonID = 0 
)
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.

Implements XrdSfsFileSystem.

◆ newFile()

virtual XrdSfsFile * XrdThrottle::FileSystem::newFile ( char *  user = 0,
int  MonID = 0 
)
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.

Implements XrdSfsFileSystem.

◆ prepare()

virtual int XrdThrottle::FileSystem::prepare ( XrdSfsPrep pargs,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
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

Implements XrdSfsFileSystem.

◆ rem()

virtual int XrdThrottle::FileSystem::rem ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
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

Implements XrdSfsFileSystem.

◆ remdir()

virtual int XrdThrottle::FileSystem::remdir ( const char *  path,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaque = 0 
)
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

Implements XrdSfsFileSystem.

◆ rename()

virtual int XrdThrottle::FileSystem::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.

◆ stat() [1/2]

virtual int XrdThrottle::FileSystem::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]

virtual int XrdThrottle::FileSystem::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
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.

Implements XrdSfsFileSystem.

◆ truncate()

virtual int XrdThrottle::FileSystem::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.

◆ xloadshed()

int XrdThrottle::FileSystem::xloadshed ( XrdOucStream Config)
private

◆ xmaxconn()

int XrdThrottle::FileSystem::xmaxconn ( XrdOucStream Config)
private

◆ xmaxopen()

int XrdThrottle::FileSystem::xmaxopen ( XrdOucStream Config)
private

◆ xthrottle()

int XrdThrottle::FileSystem::xthrottle ( XrdOucStream Config)
private

◆ xtrace()

int XrdThrottle::FileSystem::xtrace ( XrdOucStream Config)
private

Friends And Related Symbol Documentation

◆ XrdSfsGetFileSystem_Internal

XrdSfsFileSystem * XrdSfsGetFileSystem_Internal ( XrdSfsFileSystem ,
XrdSysLogger ,
const char *   
)
friend

Member Data Documentation

◆ m_config_file

std::string XrdThrottle::FileSystem::m_config_file
private

◆ m_eroute

XrdSysError XrdThrottle::FileSystem::m_eroute
private

◆ m_initialized

bool XrdThrottle::FileSystem::m_initialized
private

◆ m_instance

FileSystem* XrdThrottle::FileSystem::m_instance
staticprivate

◆ m_sfs_ptr

XrdSfsFileSystem* XrdThrottle::FileSystem::m_sfs_ptr
private

◆ m_throttle

XrdThrottleManager XrdThrottle::FileSystem::m_throttle
private

◆ m_trace

XrdOucTrace XrdThrottle::FileSystem::m_trace
private

◆ myVersion

XrdVersionInfo* XrdThrottle::FileSystem::myVersion
private

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