XRootD
XrdThrottle::FileSystem Class Reference

#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)
 
virtual int chmod (const char *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int Configure (XrdSysError &, XrdSfsFileSystem *native_fs, XrdOucEnv *envP)
 
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 XrdSfsDirectorynewDir (char *user=0, int monid=0)
 
virtual XrdSfsFilenewFile (char *user=0, int monid=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, mode_t &mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int stat (const char *Name, struct stat *buf, 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)
 
- Public Member Functions inherited from XrdSfsFileSystem
 XrdSfsFileSystem ()
 Constructor and Destructor. More...
 
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. More...
 

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 
)
virtual

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

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:

◆ Configure()

int FileSystem::Configure ( XrdSysError log,
XrdSfsFileSystem native_fs,
XrdOucEnv envP 
)
virtual

Definition at line 131 of file XrdThrottleFileSystemConfig.cc.

132 {
133  XrdOucEnv myEnv;
134  XrdOucStream Config(&m_eroute, getenv("XRDINSTANCE"), &myEnv, "(Throttle Config)> ");
135  int cfgFD;
136  if (m_config_file.length() == 0)
137  {
138  log.Say("No filename specified.");
139  return 1;
140  }
141  if ((cfgFD = open(m_config_file.c_str(), O_RDONLY)) < 0)
142  {
143  log.Emsg("Config", errno, "Unable to open configuration file", m_config_file.c_str());
144  return 1;
145  }
146  Config.Attach(cfgFD);
147  static const char *cvec[] = { "*** throttle (ofs) plugin config:", 0 };
148  Config.Capture(cvec);
149 
150  std::string fslib = OFS_NAME;
151 
152  char *var, *val;
153  int NoGo = 0;
154  while( (var = Config.GetMyFirstWord()) )
155  {
156  if (strcmp("throttle.fslib", var) == 0)
157  {
158  val = Config.GetWord();
159  if (!val || !val[0]) {log.Emsg("Config", "fslib not specified."); continue;}
160  fslib = val;
161  }
162  TS_Xeq("throttle.max_open_files", xmaxopen);
163  TS_Xeq("throttle.max_active_connections", xmaxconn);
164  TS_Xeq("throttle.throttle", xthrottle);
165  TS_Xeq("throttle.loadshed", xloadshed);
166  TS_Xeq("throttle.trace", xtrace);
167  if (NoGo)
168  {
169  log.Emsg("Config", "Throttle configuration failed.");
170  }
171  }
172 
173  // Load the filesystem object.
174  m_sfs_ptr = native_fs ? native_fs : LoadFS(fslib, m_eroute, m_config_file);
175  if (!m_sfs_ptr) return 1;
176 
177  // Overwrite the environment variable saying that throttling is the fslib.
178  XrdOucEnv::Export("XRDOFSLIB", fslib.c_str());
179 
180  if (envP)
181  {
182  auto gstream = reinterpret_cast<XrdXrootdGStream*>(envP->GetPtr("Throttle.gStream*"));
183  log.Say("Config", "Throttle g-stream has", gstream ? "" : " NOT", " been configured via xrootd.mongstream directive");
184  m_throttle.SetMonitor(gstream);
185  }
186 
187 
188  return 0;
189 }
int open(const char *path, int oflag,...)
static XrdSfsFileSystem * LoadFS(const std::string &fslib, XrdSysError &eDest, const std::string &config_file)
#define OFS_NAME
#define TS_Xeq(key, func)
static int Export(const char *Var, const char *Val)
Definition: XrdOucEnv.cc:188
void * GetPtr(const char *varname)
Definition: XrdOucEnv.cc:281
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition: XrdSysError.cc:95
void Say(const char *text1, const char *text2=0, const char *txt3=0, const char *text4=0, const char *text5=0, const char *txt6=0)
Definition: XrdSysError.cc:141
void SetMonitor(XrdXrootdGStream *gstream)
XrdCmsConfig Config
XrdOucEnv * envP
Definition: XrdPss.cc:109

References XrdCms::Config, XrdSysError::Emsg(), XrdProxy::envP, XrdOucEnv::Export(), XrdOucEnv::GetPtr(), LoadFS(), OFS_NAME, open(), XrdSysError::Say(), XrdThrottleManager::SetMonitor(), and TS_Xeq.

+ Here is the call graph for this function:

◆ Connect()

void 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.

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)
virtual

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

Definition at line 71 of file XrdThrottleFileSystem.cc.

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

References XrdSfsFileSystem::EnvInfo(), and XrdProxy::envP.

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

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

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:

◆ Features()

uint64_t FileSystem::Features ( )
virtual

Definition at line 95 of file XrdThrottleFileSystem.cc.

96 {
97  return m_sfs_ptr->Features();
98 }

References XrdSfsFileSystem::Features().

+ Here is the call graph for this function:

◆ fsctl()

int 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.

Definition at line 101 of file XrdThrottleFileSystem.cc.

105 {
106  return m_sfs_ptr->fsctl(cmd, args, out_error, client);
107 }
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 ( )
virtual

Return maximum checkpoint size.

Returns
Maximum size of a checkpoint.

Reimplemented from XrdSfsFileSystem.

Definition at line 110 of file XrdThrottleFileSystem.cc.

111 {
112  return m_sfs_ptr->getChkPSize();
113 }
virtual int getChkPSize()

References XrdSfsFileSystem::getChkPSize().

+ Here is the call graph for this function:

◆ getStats()

int 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.

Definition at line 116 of file XrdThrottleFileSystem.cc.

118 {
119  return m_sfs_ptr->getStats(buff, blen);
120 }
virtual int getStats(char *buff, int blen)=0

References XrdSfsFileSystem::getStats().

+ Here is the call graph for this function:

◆ getVersion()

const char * FileSystem::getVersion ( )
virtual

Get version string.

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

Implements XrdSfsFileSystem.

Definition at line 123 of file XrdThrottleFileSystem.cc.

124 {
125  return XrdVERSION;
126 }

◆ gpFile()

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

Reimplemented from XrdSfsFileSystem.

Definition at line 129 of file XrdThrottleFileSystem.cc.

133 {
134  return m_sfs_ptr->gpFile(gpAct, gpReq, eInfo, client);
135 }
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 
)
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.

Definition at line 138 of file XrdThrottleFileSystem.cc.

143 {
144  return m_sfs_ptr->mkdir(dirName, Mode, out_error, client, opaque);
145 }
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 
)
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.

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

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 }
XrdOucString File
virtual XrdSfsFile * newFile(char *user=0, int MonID=0)=0
std::auto_ptr< XrdSfsFile > unique_sfs_ptr
Definition: XrdThrottle.hh:23

References File, and XrdSfsFileSystem::newFile().

+ Here is the call graph for this function:

◆ prepare()

int 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.

Definition at line 148 of file XrdThrottleFileSystem.cc.

151 {
152  return m_sfs_ptr->prepare(pargs, out_error, client);
153 }
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 
)
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.

Definition at line 156 of file XrdThrottleFileSystem.cc.

160 {
161  return m_sfs_ptr->rem(path, out_error, client, info);
162 }
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 
)
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.

Definition at line 165 of file XrdThrottleFileSystem.cc.

169 {
170  return m_sfs_ptr->remdir(dirName, out_error, client, info);
171 }
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 
)
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.

Definition at line 174 of file XrdThrottleFileSystem.cc.

180 {
181  return m_sfs_ptr->rename(oldFileName, newFileName, out_error, client, infoO, infoN);
182 }
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 
)
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 the mode is -1 then it is taken as an offline file.

Implements XrdSfsFileSystem.

Definition at line 195 of file XrdThrottleFileSystem.cc.

200 {
201  return m_sfs_ptr->stat(Name, mode, out_error, client, opaque);
202 }
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 
)
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.

Definition at line 185 of file XrdThrottleFileSystem.cc.

190 {
191  return m_sfs_ptr->stat(Name, buf, out_error, client, opaque);
192 }

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

Definition at line 205 of file XrdThrottleFileSystem.cc.

210 {
211  return m_sfs_ptr->truncate(Name, fileOffset, out_error, client, opaque);
212 }
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 Function 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: