XRootD
XrdBwm Class Reference

#include <XrdBwm.hh>

+ Inheritance diagram for XrdBwm:
+ Collaboration diagram for XrdBwm:

Public Member Functions

 XrdBwm ()
 
virtual ~XrdBwm ()
 
int chmod (const char *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
virtual int Configure (XrdSysError &)
 
int exists (const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int fsctl (const int cmd, const char *args, XrdOucErrInfo &out_error, const XrdSecEntity *client)
 
int getStats (char *buff, int blen)
 
const char * getVersion ()
 
int mkdir (const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &out_error, 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 &out_error, const XrdSecEntity *client=0)
 
int rem (const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
int remdir (const char *dirName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0)
 
int rename (const char *oldFileName, const char *newFileName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0)
 
int stat (const char *Name, mode_t &mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
int stat (const char *Name, struct stat *buf, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0)
 
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 ()
 
virtual int chksum (csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, 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 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)
 

Public Attributes

char Authorize
 
char * ConfigFN
 
char * HostName
 
char * HostPref
 
char * myDomain
 
int myDomLen
 
XrdVersionInfo * myVersion
 
char Reserved [7]
 

Protected Member Functions

virtual int ConfigXeq (char *var, XrdOucStream &, XrdSysError &)
 
int Emsg (const char *, XrdOucErrInfo &, const char *, const char *, const char *y="")
 
int Emsg (const char *, XrdOucErrInfo &, int, const char *, const char *y="")
 
int Stall (XrdOucErrInfo &, int, const char *)
 

Friends

class XrdBwmDirectory
 
class XrdBwmFile
 

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 149 of file XrdBwm.hh.

Constructor & Destructor Documentation

◆ XrdBwm()

XrdBwm::XrdBwm ( )

Definition at line 89 of file XrdBwm.cc.

90 {
91  XrdNetAddr myAddr(0);
92  char buff[256], *bp;
93  int myPort, i;
94 
95 // Establish defaults
96 //
97  Authorization = 0;
98  Authorize = 0;
99  AuthLib = 0;
100  AuthParm = 0;
101  Logger = 0;
102  PolLib = 0;
103  PolParm = 0;
104  PolSlotsIn = 1;
105  PolSlotsOut = 1;
106 
107 // Obtain port number we will be using
108 //
109  myPort = (bp = getenv("XRDPORT")) ? strtol(bp, (char **)NULL, 10) : 0;
110 
111 // Establish our hostname and address
112 //
113  myAddr.Port(myPort);
114  HostName = strdup(myAddr.Name("*unknown*"));
115  myAddr.Format(buff, sizeof(buff), XrdNetAddr::fmtAdv6, XrdNetAddr::old6Map4);
116  locResp = strdup(buff); locRlen = strlen(buff);
117  for (i = 0; HostName[i] && HostName[i] != '.'; i++) {}
118  HostName[i] = '\0';
119  HostPref = strdup(HostName);
120  HostName[i] = '.';
121  myDomain = &HostName[i+1];
122  myDomLen = strlen(myDomain);
123  myVersion = &XrdVERSIONINFOVAR(XrdSfsGetFileSystem);
124 
125 // Set the configuration file name abd dummy handle
126 //
127  ConfigFN = 0;
128  dummyHandle = XrdBwmHandle::Alloc("*", "/", "?", "?", 0);
129 }
XrdSfsFileSystem * XrdSfsGetFileSystem(XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn)
Definition: XrdBwm.cc:147
static XrdBwmHandle * Alloc(const char *theUsr, const char *thePath, const char *lclNode, const char *rmtNode, int Incoming)
XrdVersionInfo * myVersion
Definition: XrdBwm.hh:244
char * myDomain
Definition: XrdBwm.hh:249
int myDomLen
Definition: XrdBwm.hh:250
char * ConfigFN
Definition: XrdBwm.hh:246
char * HostPref
Definition: XrdBwm.hh:248
char * HostName
Definition: XrdBwm.hh:247
char Authorize
Definition: XrdBwm.hh:251
static const int old6Map4
Use deprecated IPV6 mapped format.

References XrdBwmHandle::Alloc(), Authorize, ConfigFN, XrdNetAddrInfo::fmtAdv6, XrdNetAddrInfo::Format(), HostName, HostPref, myDomain, myDomLen, myVersion, XrdNetAddrInfo::Name(), XrdNetAddrInfo::old6Map4, XrdNetAddr::Port(), and XrdSfsGetFileSystem().

+ Here is the call graph for this function:

◆ ~XrdBwm()

virtual XrdBwm::~XrdBwm ( )
inlinevirtual

Definition at line 238 of file XrdBwm.hh.

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

Member Function Documentation

◆ chmod()

int XrdBwm::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 701 of file XrdBwm.cc.

716 {
717 // Return an error
718 //
719  return XrdBwmFS.Emsg("chmod", einfo, ENOTSUP, "change", path);
720 }
XrdBwm XrdBwmFS
Definition: XrdBwm.cc:83
int Emsg(const char *, XrdOucErrInfo &, int, const char *, const char *y="")
Definition: XrdBwm.cc:961

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ Configure()

int XrdBwm::Configure ( XrdSysError Eroute)
virtual

Definition at line 77 of file XrdBwmConfig.cc.

77  {
78 /*
79  Function: Establish default values using a configuration file.
80 
81  Input: None.
82 
83  Output: 0 upon success or !0 otherwise.
84 */
85  char *var;
86  int cfgFD, retc, NoGo = 0;
87  XrdOucEnv myEnv;
88  XrdOucStream Config(&Eroute, getenv("XRDINSTANCE"), &myEnv, "=====> ");
89 
90 // Print warm-up message
91 //
92  Eroute.Say("++++++ Bwm initialization started.");
93 
94 // Get the debug level from the command line
95 //
96  if (getenv("XRDDEBUG")) BwmTrace.What = TRACE_ALL;
97 
98 // If there is no config file, return with the defaults sets.
99 //
100  if( !ConfigFN || !*ConfigFN)
101  Eroute.Emsg("Config", "Configuration file not specified.");
102  else {
103  // Try to open the configuration file.
104  //
105  if ( (cfgFD = open(ConfigFN, O_RDONLY, 0)) < 0)
106  return Eroute.Emsg("Config", errno, "open config file",
107  ConfigFN);
108  Config.Attach(cfgFD);
109  static const char *cvec[] = { "*** bwm ofs plugin config:", 0 };
110  Config.Capture(cvec);
111 
112  // Now start reading records until eof.
113  //
114  while((var = Config.GetMyFirstWord()))
115  {if (!strncmp(var, "bwm.", 4))
116  if (ConfigXeq(var+4,Config,Eroute)) {Config.Echo();NoGo=1;}
117  }
118 
119  // Now check if any errors occurred during file i/o
120  //
121  if ((retc = Config.LastError()))
122  NoGo = Eroute.Emsg("Config", -retc, "read config file",
123  ConfigFN);
124  Config.Close();
125  }
126 
127 // Determine whether we should initialize authorization
128 //
129  if (Authorize) NoGo |= setupAuth(Eroute);
130 
131 // Establish scheduling policy
132 //
133  if (PolLib) NoGo |= setupPolicy(Eroute);
134  else Policy = new XrdBwmPolicy1(PolSlotsIn, PolSlotsOut);
135 
136 // Start logger object
137 //
138  if (!NoGo && Logger) NoGo = Logger->Start(&Eroute);
139 
140 // Inform the handle of the policy and logger
141 //
142  if (!NoGo) XrdBwmHandle::setPolicy(Policy, Logger);
143 
144 // All done
145 //
146  Eroute.Say("------ Bwm initialization ", (NoGo ? "failed." : "completed."));
147  return NoGo;
148 }
XrdOucTrace BwmTrace
int open(const char *path, int oflag,...)
#define TRACE_ALL
Definition: XrdTrace.hh:35
static int setPolicy(XrdBwmPolicy *pP, XrdBwmLogger *lP)
int Start(XrdSysError *eobj)
virtual int ConfigXeq(char *var, XrdOucStream &, XrdSysError &)
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
XrdCmsConfig Config

References Authorize, BwmTrace, XrdCms::Config, ConfigFN, ConfigXeq(), XrdSysError::Emsg(), open(), XrdSysError::Say(), XrdBwmHandle::setPolicy(), XrdBwmLogger::Start(), TRACE_ALL, and XrdOucTrace::What.

Referenced by XrdSfsGetFileSystem().

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

◆ ConfigXeq()

int XrdBwm::ConfigXeq ( char *  var,
XrdOucStream Config,
XrdSysError Eroute 
)
protectedvirtual

Definition at line 157 of file XrdBwmConfig.cc.

159 {
160  TS_Bit("authorize", Authorize, 1);
161  TS_Xeq("authlib", xalib);
162  TS_Xeq("log", xlog);
163  TS_Xeq("policy", xpol);
164  TS_Xeq("trace", xtrace);
165 
166  // No match found, complain.
167  //
168  Eroute.Say("Config warning: ignoring unknown directive '",var,"'.");
169  Config.Echo();
170  return 0;
171 }
#define TS_Bit(x, m, v)
Definition: XrdBwmConfig.cc:69
#define TS_Xeq(x, m)
Definition: XrdBwmConfig.cc:60

References Authorize, XrdCms::Config, XrdSysError::Say(), TS_Bit, and TS_Xeq.

Referenced by Configure().

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

◆ Emsg() [1/2]

int XrdBwm::Emsg ( const char *  pfx,
XrdOucErrInfo einfo,
const char *  item,
const char *  op,
const char *  y = "" 
)
protected

Definition at line 993 of file XrdBwm.cc.

998 {
999  char buffer[MAXPATHLEN+80];
1000 
1001 // Format the error message
1002 //
1003  snprintf(buffer,sizeof(buffer),"Unable to %s %s; %s missing",
1004  op, target, item);
1005 
1006 // Print it out if debugging is enabled
1007 //
1008 #ifndef NODEBUG
1009  BwmEroute.Emsg(pfx, einfo.getErrUser(), buffer);
1010 #endif
1011 
1012 // Place the error message in the error object and return
1013 //
1014  einfo.setErrInfo(EINVAL, buffer);
1015  return SFS_ERROR;
1016 }
XrdSysError BwmEroute(0)
Definition: XrdBwm.cc:69
#define SFS_ERROR
int setErrInfo(int code, const char *emsg)
const char * getErrUser()

References BwmEroute, XrdSysError::Emsg(), XrdOucErrInfo::getErrUser(), XrdOucErrInfo::setErrInfo(), and SFS_ERROR.

+ Here is the call graph for this function:

◆ Emsg() [2/2]

int XrdBwm::Emsg ( const char *  pfx,
XrdOucErrInfo einfo,
int  ecode,
const char *  op,
const char *  y = "" 
)
protected

Definition at line 961 of file XrdBwm.cc.

966 {
967  const char *etext;
968  char buffer[MAXPATHLEN+80];
969 
970 // Get the reason for the error
971 //
972  if (ecode < 0) ecode = -ecode;
973  etext = BwmEroute.ec2text(ecode);
974 
975 // Format the error message
976 //
977  snprintf(buffer,sizeof(buffer),"Unable to %s %s; %s", op, target, etext);
978 
979 // Print it out if debugging is enabled
980 //
981 #ifndef NODEBUG
982  BwmEroute.Emsg(pfx, einfo.getErrUser(), buffer);
983 #endif
984 
985 // Place the error message in the error object and return
986 //
987  einfo.setErrInfo(ecode, buffer);
988  return SFS_ERROR;
989 }
static const char * ec2text(int ecode)
Definition: XrdSysError.cc:79

References BwmEroute, XrdSysError::ec2text(), XrdSysError::Emsg(), XrdOucErrInfo::getErrUser(), XrdOucErrInfo::setErrInfo(), and SFS_ERROR.

Referenced by chmod(), XrdBwmDirectory::close(), XrdBwmFile::fctl(), fsctl(), mkdir(), XrdBwmDirectory::nextEntry(), XrdBwmDirectory::open(), XrdBwmFile::open(), rename(), stat(), truncate(), and XrdBwmFile::truncate().

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

◆ exists()

int XrdBwm::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 726 of file XrdBwm.cc.

748 {
749 
750  file_exists=XrdSfsFileExistNo;
751  return SFS_OK;
752 }
@ XrdSfsFileExistNo
#define SFS_OK

References SFS_OK, and XrdSfsFileExistNo.

◆ fsctl()

int XrdBwm::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 758 of file XrdBwm.cc.

774 {
775 // Operation is not supported
776 //
777  return XrdBwmFS.Emsg("fsctl", einfo, ENOTSUP, "fsctl", args);
778 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ getStats()

int XrdBwm::getStats ( char *  buff,
int  blen 
)
inlinevirtual

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 183 of file XrdBwm.hh.

183 {return 0;}

◆ getVersion()

const char * XrdBwm::getVersion ( )
virtual

Get version string.

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

Implements XrdSfsFileSystem.

Definition at line 784 of file XrdBwm.cc.

784 {return XrdVERSION;}

◆ mkdir()

int XrdBwm::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 790 of file XrdBwm.cc.

808 {
809 // Return an error
810 //
811  return XrdBwmFS.Emsg("mkdir", einfo, ENOTSUP, "mkdir", path);
812 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ newDir()

XrdSfsDirectory* XrdBwm::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 158 of file XrdBwm.hh.

159  {return (XrdSfsDirectory *)new XrdBwmDirectory(user,monid);}
friend class XrdBwmDirectory
Definition: XrdBwm.hh:151

References XrdBwmDirectory.

◆ newFile()

XrdSfsFile* XrdBwm::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 161 of file XrdBwm.hh.

162  {return (XrdSfsFile *)new XrdBwmFile(user,monid);}
friend class XrdBwmFile
Definition: XrdBwm.hh:152

References XrdBwmFile.

◆ prepare()

int XrdBwm::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 818 of file XrdBwm.cc.

821 {
822  return 0;
823 }

◆ rem()

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

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 197 of file XrdBwm.hh.

201  {return remove('f', path, out_error, client, info);}

◆ remdir()

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

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 203 of file XrdBwm.hh.

207  {return remove('d',dirName,out_error,client,info);}

◆ rename()

int XrdBwm::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 855 of file XrdBwm.cc.

873 {
874 // Return an error
875 //
876  return XrdBwmFS.Emsg("rename", einfo, ENOTSUP, "rename", old_name);
877 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ Stall()

int XrdBwm::Stall ( XrdOucErrInfo einfo,
int  stime,
const char *  path 
)
protected

Definition at line 1022 of file XrdBwm.cc.

1025 {
1026  EPNAME("Stall")
1027 #ifndef NODEBUG
1028  const char *tident = einfo.getErrUser();
1029 #endif
1030 
1031 // Trace the stall
1032 //
1033  ZTRACE(delay, "Stall " <<stime <<" for " <<path);
1034 
1035 // Place the error message in the error object and return
1036 //
1037  einfo.setErrInfo(0, "");
1038  return stime;
1039 }
#define tident
#define EPNAME(x)
Definition: XrdBwmTrace.hh:56
#define ZTRACE(act, x)
Definition: XrdBwmTrace.hh:52

References EPNAME, XrdOucErrInfo::getErrUser(), XrdOucErrInfo::setErrInfo(), tident, and ZTRACE.

Referenced by XrdBwmFile::open().

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

◆ stat() [1/2]

int XrdBwm::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 907 of file XrdBwm.cc.

925 {
926 // Return an error
927 //
928  return XrdBwmFS.Emsg("stat", einfo, ENOTSUP, "locate", path);
929 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ stat() [2/2]

int XrdBwm::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 883 of file XrdBwm.cc.

899 {
900 // Return an error
901 //
902  return XrdBwmFS.Emsg("stat", einfo, ENOTSUP, "locate", path);
903 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

◆ truncate()

int XrdBwm::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 935 of file XrdBwm.cc.

951 {
952 // Return an error
953 //
954  return XrdBwmFS.Emsg("truncate", einfo, ENOTSUP, "truncate", path);
955 }

References Emsg(), and XrdBwmFS.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ XrdBwmDirectory

friend class XrdBwmDirectory
friend

Definition at line 151 of file XrdBwm.hh.

Referenced by newDir().

◆ XrdBwmFile

friend class XrdBwmFile
friend

Definition at line 152 of file XrdBwm.hh.

Referenced by newFile().

Member Data Documentation

◆ Authorize

char XrdBwm::Authorize

Definition at line 251 of file XrdBwm.hh.

Referenced by XrdBwm(), Configure(), and ConfigXeq().

◆ ConfigFN

char* XrdBwm::ConfigFN

Definition at line 246 of file XrdBwm.hh.

Referenced by XrdBwm(), Configure(), and XrdSfsGetFileSystem().

◆ HostName

char* XrdBwm::HostName

Definition at line 247 of file XrdBwm.hh.

Referenced by XrdBwm().

◆ HostPref

char* XrdBwm::HostPref

Definition at line 248 of file XrdBwm.hh.

Referenced by XrdBwm().

◆ myDomain

char* XrdBwm::myDomain

Definition at line 249 of file XrdBwm.hh.

Referenced by XrdBwm(), and XrdBwmFile::open().

◆ myDomLen

int XrdBwm::myDomLen

Definition at line 250 of file XrdBwm.hh.

Referenced by XrdBwm(), and XrdBwmFile::open().

◆ myVersion

XrdVersionInfo* XrdBwm::myVersion

Definition at line 244 of file XrdBwm.hh.

Referenced by XrdBwm().

◆ Reserved

char XrdBwm::Reserved[7]

Definition at line 252 of file XrdBwm.hh.


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