XRootD
Loading...
Searching...
No Matches
XrdThrottle::FileSystem Class Referencefinal

#include <XrdThrottle.hh>

+ Inheritance diagram for XrdThrottle::FileSystem:
+ Collaboration diagram for XrdThrottle::FileSystem:

Public Member Functions

virtual int chksum (csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0) override
 
virtual int chmod (const char *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
 
virtual void Connect (const XrdSecEntity *client=0) override
 
virtual void Disc (const XrdSecEntity *client=0) override
 
virtual void EnvInfo (XrdOucEnv *envP) override
 
virtual int exists (const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
 
virtual int FAttr (XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0) override
 
virtual int fsctl (const int cmd, const char *args, XrdOucErrInfo &out_error, const XrdSecEntity *client) override
 
virtual int getChkPSize () override
 
virtual int getStats (char *buff, int blen) override
 
virtual const char * getVersion () override
 
virtual int gpFile (gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0) override
 
virtual int mkdir (const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
 
virtual XrdSfsDirectorynewDir (char *user=0, int monid=0) override
 
virtual XrdSfsFilenewFile (char *user=0, int monid=0) override
 
virtual int prepare (XrdSfsPrep &pargs, XrdOucErrInfo &out_error, const XrdSecEntity *client=0) override
 
virtual int rem (const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0) override
 
virtual int remdir (const char *dirName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0) override
 
virtual int rename (const char *oldFileName, const char *newFileName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0) override
 
virtual int stat (const char *Name, mode_t &mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
 
virtual int stat (const char *Name, struct stat *buf, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
 
virtual int truncate (const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &out_error, const XrdSecEntity *client=0, const char *opaque=0) override
 
- Public Member Functions inherited from XrdSfsFileSystem
 XrdSfsFileSystem ()
 Constructor and Destructor.
 
virtual ~XrdSfsFileSystem ()
 
uint64_t Features ()
 
virtual int FSctl (const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual XrdSfsDirectorynewDir (XrdOucErrInfo &eInfo)
 
virtual XrdSfsFilenewFile (XrdOucErrInfo &eInfo)
 

Friends

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

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.
 

Detailed Description

Definition at line 135 of file XrdThrottle.hh.

Member Function Documentation

◆ chksum()

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

Reimplemented from XrdSfsFileSystem.

Definition at line 38 of file XrdThrottleFileSystem.cc.

44{
45 return m_sfs_ptr->chksum(Func, csName, path, eInfo, client, opaque);
46}
virtual int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)

References XrdSfsFileSystem::chksum().

+ Here is the call graph for this function:

◆ chmod()

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

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.

Definition at line 49 of file XrdThrottleFileSystem.cc.

54{
55 return m_sfs_ptr->chmod(Name, Mode, out_error, client, opaque);
56}
int Mode
virtual int chmod(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::chmod(), and Mode.

+ Here is the call graph for this function:

◆ Connect()

void FileSystem::Connect ( const XrdSecEntity client = 0)
overridevirtual

Notify filesystem that a client has connected.

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

Reimplemented from XrdSfsFileSystem.

Definition at line 59 of file XrdThrottleFileSystem.cc.

60{
61 m_sfs_ptr->Connect(client);
62}
virtual void Connect(const XrdSecEntity *client=0)

References XrdSfsFileSystem::Connect().

+ Here is the call graph for this function:

◆ Disc()

void FileSystem::Disc ( const XrdSecEntity client = 0)
overridevirtual

Notify filesystem that a client has disconnected.

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

Reimplemented from XrdSfsFileSystem.

Definition at line 65 of file XrdThrottleFileSystem.cc.

66{
67 m_sfs_ptr->Disc(client);
68}
virtual void Disc(const XrdSecEntity *client=0)

References XrdSfsFileSystem::Disc().

+ Here is the call graph for this function:

◆ EnvInfo()

void FileSystem::EnvInfo ( XrdOucEnv envP)
overridevirtual

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.

Definition at line 71 of file XrdThrottleFileSystem.cc.

72{
73 m_sfs_ptr->EnvInfo(envP);
74}
virtual void EnvInfo(XrdOucEnv *envP)

References XrdSfsFileSystem::EnvInfo().

+ Here is the call graph for this function:

◆ exists()

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

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.

Definition at line 77 of file XrdThrottleFileSystem.cc.

82{
83 return m_sfs_ptr->exists(fileName, exists_flag, out_error, client, opaque);
84}
virtual int exists(const char *path, XrdSfsFileExistence &eFlag, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::exists().

+ Here is the call graph for this function:

◆ FAttr()

int FileSystem::FAttr ( XrdSfsFACtl faReq,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
overridevirtual

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.

Definition at line 87 of file XrdThrottleFileSystem.cc.

90{
91 return m_sfs_ptr->FAttr(faReq, eInfo, client);
92}
virtual int FAttr(XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)

References XrdSfsFileSystem::FAttr().

+ Here is the call graph for this function:

◆ fsctl()

int FileSystem::fsctl ( const int  cmd,
const char *  args,
XrdOucErrInfo eInfo,
const XrdSecEntity client 
)
overridevirtual

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.

Definition at line 95 of file XrdThrottleFileSystem.cc.

99{
100 return m_sfs_ptr->fsctl(cmd, args, out_error, client);
101}
virtual int fsctl(const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0

References XrdSfsFileSystem::fsctl().

+ Here is the call graph for this function:

◆ getChkPSize()

int FileSystem::getChkPSize ( )
overridevirtual

Return maximum checkpoint size.

Returns
Maximum size of a checkpoint.

Reimplemented from XrdSfsFileSystem.

Definition at line 104 of file XrdThrottleFileSystem.cc.

105{
106 return m_sfs_ptr->getChkPSize();
107}
virtual int getChkPSize()

References XrdSfsFileSystem::getChkPSize().

+ Here is the call graph for this function:

◆ getStats()

int FileSystem::getStats ( char *  buff,
int  blen 
)
overridevirtual

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.

Definition at line 110 of file XrdThrottleFileSystem.cc.

112{
113 return m_sfs_ptr->getStats(buff, blen);
114}
virtual int getStats(char *buff, int blen)=0

References XrdSfsFileSystem::getStats().

+ Here is the call graph for this function:

◆ getVersion()

const char * FileSystem::getVersion ( )
overridevirtual

Get version string.

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

Implements XrdSfsFileSystem.

Definition at line 117 of file XrdThrottleFileSystem.cc.

118{
119 return XrdVERSION;
120}

◆ gpFile()

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

Reimplemented from XrdSfsFileSystem.

Definition at line 123 of file XrdThrottleFileSystem.cc.

127{
128 return m_sfs_ptr->gpFile(gpAct, gpReq, eInfo, client);
129}
virtual int gpFile(gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)

References XrdSfsFileSystem::gpFile().

+ Here is the call graph for this function:

◆ mkdir()

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

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.

Definition at line 132 of file XrdThrottleFileSystem.cc.

137{
138 return m_sfs_ptr->mkdir(dirName, Mode, out_error, client, opaque);
139}
virtual int mkdir(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::mkdir(), and Mode.

+ Here is the call graph for this function:

◆ newDir()

XrdSfsDirectory * FileSystem::newDir ( char *  user = 0,
int  MonID = 0 
)
overridevirtual

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.

Definition at line 13 of file XrdThrottleFileSystem.cc.

15{
16 return m_sfs_ptr->newDir(user, monid);
17}
virtual XrdSfsDirectory * newDir(char *user=0, int MonID=0)=0

References XrdSfsFileSystem::newDir().

+ Here is the call graph for this function:

◆ newFile()

XrdSfsFile * FileSystem::newFile ( char *  user = 0,
int  MonID = 0 
)
overridevirtual

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.

Definition at line 20 of file XrdThrottleFileSystem.cc.

22{
23 XrdSfsFile * chain_file = m_sfs_ptr->newFile(user, monid);
24 if (chain_file)
25 {
26 unique_sfs_ptr chain_file_ptr(chain_file);
27 // We should really be giving out shared_ptrs to m_throttle, but alas, no boost.
28#if __cplusplus >= 201103L
29 return static_cast<XrdSfsFile*>(new File(user, std::move(chain_file_ptr), m_throttle, m_eroute));
30#else
31 return static_cast<XrdSfsFile*>(new File(user, chain_file_ptr, m_throttle, m_eroute));
32#endif
33 }
34 return NULL;
35}
virtual XrdSfsFile * newFile(char *user=0, int MonID=0)=0
std::auto_ptr< XrdSfsFile > unique_sfs_ptr

References XrdSfsFileSystem::newFile().

+ Here is the call graph for this function:

◆ prepare()

int FileSystem::prepare ( XrdSfsPrep pargs,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0 
)
overridevirtual

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.

Definition at line 142 of file XrdThrottleFileSystem.cc.

145{
146 return m_sfs_ptr->prepare(pargs, out_error, client);
147}
virtual int prepare(XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0

References XrdSfsFileSystem::prepare().

+ Here is the call graph for this function:

◆ rem()

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

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.

Definition at line 150 of file XrdThrottleFileSystem.cc.

154{
155 return m_sfs_ptr->rem(path, out_error, client, info);
156}
virtual int rem(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::rem().

+ Here is the call graph for this function:

◆ remdir()

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

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.

Definition at line 159 of file XrdThrottleFileSystem.cc.

163{
164 return m_sfs_ptr->remdir(dirName, out_error, client, info);
165}
virtual int remdir(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::remdir().

+ Here is the call graph for this function:

◆ rename()

int FileSystem::rename ( const char *  oPath,
const char *  nPath,
XrdOucErrInfo eInfo,
const XrdSecEntity client,
const char *  opaqueO = 0,
const char *  opaqueN = 0 
)
overridevirtual

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.

Definition at line 168 of file XrdThrottleFileSystem.cc.

174{
175 return m_sfs_ptr->rename(oldFileName, newFileName, out_error, client, infoO, infoN);
176}
virtual int rename(const char *oPath, const char *nPath, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaqueO=0, const char *opaqueN=0)=0

References XrdSfsFileSystem::rename().

+ Here is the call graph for this function:

◆ stat() [1/2]

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

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 the mode is -1 then it is taken as an offline file.

Implements XrdSfsFileSystem.

Definition at line 189 of file XrdThrottleFileSystem.cc.

194{
195 return m_sfs_ptr->stat(Name, mode, out_error, client, opaque);
196}
virtual int stat(const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::stat().

+ Here is the call graph for this function:

◆ stat() [2/2]

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

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.

Definition at line 179 of file XrdThrottleFileSystem.cc.

184{
185 return m_sfs_ptr->stat(Name, buf, out_error, client, opaque);
186}

References XrdSfsFileSystem::stat().

+ Here is the call graph for this function:

◆ truncate()

int FileSystem::truncate ( const char *  path,
XrdSfsFileOffset  fsize,
XrdOucErrInfo eInfo,
const XrdSecEntity client = 0,
const char *  opaque = 0 
)
overridevirtual

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.

Definition at line 199 of file XrdThrottleFileSystem.cc.

204{
205 return m_sfs_ptr->truncate(Name, fileOffset, out_error, client, opaque);
206}
virtual int truncate(const char *path, XrdSfsFileOffset fsize, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::truncate().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ XrdSfsGetFileSystem_Internal

XrdSfsFileSystem * XrdSfsGetFileSystem_Internal ( XrdSfsFileSystem native_fs,
XrdSysLogger lp,
const char *  configfn,
XrdOucEnv envP 
)
friend

Definition at line 56 of file XrdThrottleFileSystemConfig.cc.

60{
61 FileSystem* fs = NULL;
62 FileSystem::Initialize(fs, native_fs, lp, configfn, envP);
63 return fs;
64}

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