XRootD
XrdSsiSfs Class Reference

#include <XrdSsiSfs.hh>

+ Inheritance diagram for XrdSsiSfs:
+ Collaboration diagram for XrdSsiSfs:

Public Member Functions

 XrdSsiSfs ()
 
virtual ~XrdSsiSfs ()
 
int chksum (csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
 
int chmod (const char *Name, XrdSfsMode Mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
 
int exists (const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
 
int fsctl (const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client)
 
int getStats (char *buff, int blen)
 
const char * getVersion ()
 
int mkdir (const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
 
XrdSfsDirectorynewDir (char *user=0, int MonID=0)
 
XrdSfsFilenewFile (char *user=0, int MonID=0)
 
int prepare (XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
int rem (const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *info=0)
 
int remdir (const char *dirName, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *info=0)
 
int rename (const char *oldFileName, const char *newFileName, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0)
 
void setFeatures (XrdSfsFileSystem *prevFS)
 
int stat (const char *Name, mode_t &mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
 
int stat (const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client, const char *opaque=0)
 
int truncate (const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
 
- Public Member Functions inherited from XrdSfsFileSystem
 XrdSfsFileSystem ()
 Constructor and Destructor. More...
 
virtual ~XrdSfsFileSystem ()
 
virtual void Connect (const XrdSecEntity *client=0)
 
virtual void Disc (const XrdSecEntity *client=0)
 
virtual void EnvInfo (XrdOucEnv *envP)
 
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 getChkPSize ()
 
virtual int gpFile (gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
 
virtual XrdSfsDirectorynewDir (XrdOucErrInfo &eInfo)
 
virtual XrdSfsFilenewFile (XrdOucErrInfo &eInfo)
 

Static Public Member Functions

static void setMax (int mVal)
 

Friends

class XrdSsiFile
 

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 44 of file XrdSsiSfs.hh.

Constructor & Destructor Documentation

◆ XrdSsiSfs()

XrdSsiSfs::XrdSsiSfs ( )
inline

Definition at line 139 of file XrdSsiSfs.hh.

139 {}

◆ ~XrdSsiSfs()

virtual XrdSsiSfs::~XrdSsiSfs ( )
inlinevirtual

Definition at line 140 of file XrdSsiSfs.hh.

140 {} // Too complicate to delete :-)

Member Function Documentation

◆ chksum()

int XrdSsiSfs::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 161 of file XrdSsiSfs.cc.

167 {
168 // Reroute this request if we can
169 //
170  if (fsChk) return theFS->chksum(Func, csName, Path, einfo, client, opaque);
171  einfo.setErrInfo(ENOTSUP, "Checksums are not supported.");
172  return SFS_ERROR;
173 }
XrdOucString Path
#define SFS_ERROR
virtual int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
XrdSfsFileSystem * theFS
Definition: XrdSsiFile.cc:54
bool fsChk
Definition: XrdSsiFile.cc:56

References XrdSfsFileSystem::chksum(), XrdSsi::fsChk, Path, XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ chmod()

int XrdSsiSfs::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 179 of file XrdSsiSfs.cc.

184 {
185 // Reroute this request if we can
186 //
187  if (fsChk)
188  {if (FSPath.Find(path))
189  return theFS->chmod(path, Mode, einfo, client, info);
190  einfo.setErrInfo(ENOTSUP, "chmod is not supported for given path.");
191  } else einfo.setErrInfo(ENOTSUP, "chmod is not supported.");
192  return SFS_ERROR;
193 }
int Mode
unsigned long long Find(const char *pathname)
Definition: XrdOucPList.hh:112
virtual int chmod(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
XrdOucPListAnchor FSPath
Definition: XrdSsiFile.cc:55

References XrdSfsFileSystem::chmod(), XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, Mode, XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ exists()

int XrdSsiSfs::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 227 of file XrdSsiSfs.cc.

232 {
233 // Reroute this request if we can
234 //
235  if (fsChk)
236  {if (FSPath.Find(path))
237  return theFS->exists(path, file_exists, einfo, client, info);
238  einfo.setErrInfo(ENOTSUP, "exists is not supported for given path.");
239  } else einfo.setErrInfo(ENOTSUP, "exists is not supported.");
240  return SFS_ERROR;
241 }
virtual int exists(const char *path, XrdSfsFileExistence &eFlag, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdSfsFileSystem::exists(), XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ fsctl()

int XrdSsiSfs::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 247 of file XrdSsiSfs.cc.

263 {
264  EPNAME("fsctl");
265  const char *tident = einfo.getErrUser();
266 
267  char pbuff[1024], rType[3] = {'S', 'w', 0};
268  const char *Resp[2] = {rType, pbuff};
269  const char *opq, *Path = Split(args,&opq,pbuff,sizeof(pbuff));
270  XrdNetIF::ifType ifType;
271  int Resp1Len;
272 
273 // Do some debugging
274 //
275  DEBUG(args);
276 
277 // We only process the locate request here. Reroute it if we can otherwise.
278 //
279  if ((cmd & SFS_FSCTL_CMD) != SFS_FSCTL_LOCATE)
280  {if (fsChk) return theFS->fsctl(cmd, args, einfo, client);
281  einfo.setErrInfo(ENOTSUP, "Requested fsctl operation not supported.");
282  return SFS_ERROR;
283  }
284 
285 // Preprocess the argument
286 //
287  if (*Path == '*') Path++;
288  else if (cmd & SFS_O_TRUNC) Path = 0;
289 
290 // Check if we should reoute this request
291 //
292  if (fsChk && Path && FSPath.Find(Path))
293  return theFS->fsctl(cmd, args, einfo, client);
294 
295 // If we have a path then see if we really have it
296 //
297  if (Path)
298  {if (!Provider) return Emsg(epname, einfo, EHOSTUNREACH, "locate", Path);
300  if (rStat == XrdSsiProvider::isPresent) rType[0] = 'S';
301  else if (rStat == XrdSsiProvider::isPending) rType[0] = 's';
302  else return Emsg(epname, einfo, ENOENT, "locate", Path);
303  }
304  }
305 
306 // Compute interface return options
307 //
308  ifType = XrdNetIF::GetIFType((einfo.getUCap() & XrdOucEI::uIPv4) != 0,
309  (einfo.getUCap() & XrdOucEI::uIPv64) != 0,
310  (einfo.getUCap() & XrdOucEI::uPrip) != 0);
311  bool retHN = (cmd & SFS_O_HNAME) != 0;
312 
313 // Get our destination
314 //
315  if ((Resp1Len = myIF->GetDest(pbuff, sizeof(pbuff), ifType, retHN)))
316  {einfo.setErrInfo(Resp1Len+3, (const char **)Resp, 2);
317  return SFS_DATA;
318  }
319 
320 // We failed for some unknown reason
321 //
322  return Emsg(epname, einfo, ENETUNREACH, "locate", Path);
323 }
#define tident
#define DEBUG(x)
Definition: XrdBwmTrace.hh:54
#define EPNAME(x)
Definition: XrdBwmTrace.hh:56
#define SFS_O_HNAME
#define SFS_DATA
#define SFS_FSCTL_CMD
#define SFS_FSCTL_LOCATE
#define SFS_O_TRUNC
static ifType GetIFType(bool conIPv4, bool hasIP64, bool pvtIP)
Definition: XrdNetIF.hh:250
int GetDest(char *dest, int dlen, ifType ifT=PublicV6, bool prefn=false)
Definition: XrdNetIF.cc:389
ifType
The enum that is used to index into ifData to get appropriate interface.
Definition: XrdNetIF.hh:65
virtual int fsctl(const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0
virtual rStat QueryResource(const char *rName, const char *contact=0)=0
XrdNetIF * myIF
XrdSsiProvider * Provider
static const int uIPv64
ucap: Supports only IPv4 info
static const int uIPv4
ucap: Supports read redirects
static const int uPrip

References DEBUG, EPNAME, XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSfsFileSystem::fsctl(), XrdSsi::FSPath, XrdNetIF::GetDest(), XrdOucErrInfo::getErrUser(), XrdNetIF::GetIFType(), XrdOucErrInfo::getUCap(), XrdSsiProvider::isPending, XrdSsiProvider::isPresent, XrdSsi::myIF, Path, XrdSsi::Provider, XrdSsiProvider::QueryResource(), XrdOucErrInfo::setErrInfo(), SFS_DATA, SFS_ERROR, SFS_FSCTL_CMD, SFS_FSCTL_LOCATE, SFS_O_HNAME, SFS_O_TRUNC, XrdSsi::theFS, tident, XrdOucEI::uIPv4, XrdOucEI::uIPv64, and XrdOucEI::uPrip.

+ Here is the call graph for this function:

◆ getStats()

int XrdSsiSfs::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 330 of file XrdSsiSfs.cc.

331 {
332 // Return statustics
333 //
334  return Stats.Stats(buff, blen);
335 }
XrdPosixStats Stats
Definition: XrdPosixFile.cc:64

References XrdSsi::Stats, and XrdSsiStats::Stats().

+ Here is the call graph for this function:

◆ getVersion()

const char * XrdSsiSfs::getVersion ( )
virtual

Get version string.

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

Implements XrdSfsFileSystem.

Definition at line 341 of file XrdSsiSfs.cc.

341 {return XrdVERSION;}

◆ mkdir()

int XrdSsiSfs::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 347 of file XrdSsiSfs.cc.

352 {
353 // Reroute this request if we can
354 //
355  if (fsChk)
356  {if (FSPath.Find(path))
357  return theFS->mkdir(path, Mode, einfo, client, info);
358  einfo.setErrInfo(ENOTSUP, "mkdir is not supported for given path.");
359  } else einfo.setErrInfo(ENOTSUP, "mkdir is not supported.");
360  return SFS_ERROR;
361 }
virtual int mkdir(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdSfsFileSystem::mkdir(), Mode, XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ newDir()

XrdSfsDirectory* XrdSsiSfs::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.

Definition at line 52 of file XrdSsiSfs.hh.

53  {return new XrdSsiDir(user, MonID);}

◆ newFile()

XrdSfsFile* XrdSsiSfs::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.

Definition at line 55 of file XrdSsiSfs.hh.

56  {return new XrdSsiFile(user, MonID);}
friend class XrdSsiFile
Definition: XrdSsiSfs.hh:46

References XrdSsiFile.

◆ prepare()

int XrdSsiSfs::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 367 of file XrdSsiSfs.cc.

370 {
371 // Reroute this if we can
372 //
373  if (theFS) return theFS->prepare(pargs, out_error, client);
374  return SFS_OK;
375 }
#define SFS_OK
virtual int prepare(XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0

References XrdSfsFileSystem::prepare(), SFS_OK, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ rem()

int XrdSsiSfs::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 381 of file XrdSsiSfs.cc.

385 {
386 // Reroute this request if we can
387 //
388  if (fsChk)
389  {if (FSPath.Find(path))
390  return theFS->rem(path, einfo, client, info);
391  einfo.setErrInfo(ENOTSUP, "rem is not supported for given path.");
392  } else einfo.setErrInfo(ENOTSUP, "rem is not supported.");
393  return SFS_ERROR;
394 }
virtual int rem(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdSfsFileSystem::rem(), XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ remdir()

int XrdSsiSfs::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 400 of file XrdSsiSfs.cc.

404 {
405 // Reroute this request if we can
406 //
407  if (fsChk)
408  {if (FSPath.Find(path))
409  return theFS->rem(path, einfo, client, info);
410  einfo.setErrInfo(ENOTSUP, "remdir is not supported for given path.");
411  } else einfo.setErrInfo(ENOTSUP, "remdir is not supported.");
412  return SFS_ERROR;
413 }

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdSfsFileSystem::rem(), XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ rename()

int XrdSsiSfs::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 419 of file XrdSsiSfs.cc.

425 {
426 // Reroute this request if we can
427 //
428  if (fsChk)
429  {if (FSPath.Find(old_name))
430  return theFS->rename(old_name,new_name,einfo,client,infoO,infoN);
431  einfo.setErrInfo(ENOTSUP, "rename is not supported for given path.");
432  } else einfo.setErrInfo(ENOTSUP, "rename is not supported.");
433  return SFS_ERROR;
434 }
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 XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdSfsFileSystem::rename(), XrdOucErrInfo::setErrInfo(), SFS_ERROR, and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ setFeatures()

void XrdSsiSfs::setFeatures ( XrdSfsFileSystem prevFS)

Definition at line 440 of file XrdSsiSfs.cc.

441 {
442  uint64_t fSet = (prevFS ? prevFS->Features() : 0);
443 
444  FeatureSet = fSet | XrdSfs::hasSXIO;
445 }
uint64_t FeatureSet
Adjust features at initialization.
static const uint64_t hasSXIO
Feature: Supports SfsXio.
Definition: XrdSfsFlags.hh:68

References XrdSfsFileSystem::Features(), and XrdSfs::hasSXIO.

Referenced by XrdSfsGetFileSystem2().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMax()

static void XrdSsiSfs::setMax ( int  mVal)
inlinestatic

Definition at line 137 of file XrdSsiSfs.hh.

137 {freeMax = mVal;}

◆ stat() [1/2]

int XrdSsiSfs::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 485 of file XrdSsiSfs.cc.

490 {
491 // Reroute this request if we can
492 //
493  if (fsChk)
494  {if (FSPath.Find(path))
495  return theFS->stat(path, mode, einfo, client, info);
496  einfo.setErrInfo(ENOTSUP, "stat is not supported for given path.");
497  } else einfo.setErrInfo(ENOTSUP, "stat is not supported.");
498  return SFS_ERROR;
499 }
virtual int stat(const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdOucErrInfo::setErrInfo(), SFS_ERROR, XrdSfsFileSystem::stat(), and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ stat() [2/2]

int XrdSsiSfs::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 467 of file XrdSsiSfs.cc.

472 {
473 // Reroute this request if we can
474 //
475  if (fsChk)
476  {if (FSPath.Find(path))
477  return theFS->stat(path, buf, einfo, client, info);
478  einfo.setErrInfo(ENOTSUP, "stat is not supported for given path.");
479  } else einfo.setErrInfo(ENOTSUP, "stat is not supported.");
480  return SFS_ERROR;
481 }

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdOucErrInfo::setErrInfo(), SFS_ERROR, XrdSfsFileSystem::stat(), and XrdSsi::theFS.

+ Here is the call graph for this function:

◆ truncate()

int XrdSsiSfs::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 505 of file XrdSsiSfs.cc.

510 {
511 // Reroute this request if we can
512 //
513  if (fsChk)
514  {if (FSPath.Find(path))
515  return theFS->truncate(path, Size, einfo, client, info);
516  einfo.setErrInfo(ENOTSUP, "truncate is not supported for given path.");
517  } else einfo.setErrInfo(ENOTSUP, "truncate is not supported.");
518  return SFS_ERROR;
519 }
virtual int truncate(const char *path, XrdSfsFileOffset fsize, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0

References XrdOucPListAnchor::Find(), XrdSsi::fsChk, XrdSsi::FSPath, XrdOucErrInfo::setErrInfo(), SFS_ERROR, XrdSsi::theFS, and XrdSfsFileSystem::truncate().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ XrdSsiFile

friend class XrdSsiFile
friend

Definition at line 46 of file XrdSsiSfs.hh.

Referenced by newFile().


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