XRootD
Loading...
Searching...
No Matches
XrdFrmConfig Class Reference

#include <XrdFrmConfig.hh>

+ Collaboration diagram for XrdFrmConfig:

Classes

struct  Cmd
 
struct  Policy
 
struct  VPInfo
 

Public Types

enum  PPVar {
  PP_atime =0 ,
  PP_ctime ,
  PP_fname ,
  PP_fsize ,
  PP_fspace ,
  PP_mtime ,
  PP_pfn ,
  PP_sname ,
  PP_tspace ,
  PP_usage
}
 
enum  SubSys {
  ssAdmin ,
  ssMigr ,
  ssPstg ,
  ssPurg ,
  ssXfr
}
 

Public Member Functions

 XrdFrmConfig (SubSys ss, const char *vopts, const char *uinfo)
 
 ~XrdFrmConfig ()
 
int Configure (int argc, char **argv, int(*ppf)())
 
int LocalPath (const char *oldp, char *newp, int newpsz)
 
int LogicalPath (const char *oldp, char *newp, int newpsz)
 
int NeedsCTA (const char *Lfn)
 
unsigned long long PathOpts (const char *Lfn)
 
int RemotePath (const char *oldp, char *newp, int newpsz)
 
XrdOucTListSpace (const char *Name, const char *Path=0)
 
int Stat (const char *xLfn, const char *xPfn, struct stat *buff)
 

Public Attributes

int AdminMode
 
char * AdminPath
 
XrdCksCksMan
 
long long cmdFree
 
int cmdHold
 
XrdNetCmsNotifycmsPath
 
Policy dfltPolicy
 
int dirHold
 
int FailHold
 
int Fix
 
int hasCache
 
int haveCMS
 
int IdleHold
 
int isAgent
 
int isOTO
 
const char * lockFN
 
char * MSSCmd
 
XrdOucProgMSSProg
 
const char * myFrmID
 
const char * myFrmid
 
gid_t myGid
 
const char * myInst
 
char * myInstance
 
const char * myName
 
const char * myProg
 
const char * mySite
 
uid_t myUid
 
int nextArg
 
int nonXA
 
int numcArg
 
XrdOfsConfigPIOfsCfg
 
XrdOssossFS
 
VPInfopathList
 
char * PidPath
 
char * pProg
 
char pVec [pVecMax]
 
int pVecNum
 
char * QPath
 
int runNew
 
int runOld
 
XrdOucTListspacList
 
char * StopPurge
 
int Test
 
XrdOucName2Namethe_N2N
 
int TrackDC
 
char ** vectArg
 
int Verbose
 
struct XrdFrmConfig::VPInfoVPList
 
int WaitMigr
 
int WaitPurge
 
int WaitQChk
 
struct XrdFrmConfig::Cmd xfrCmd [4]
 
char * xfrFdir
 
int xfrFdln
 
int xfrIN
 
int xfrMax
 
int xfrMaxIn
 
int xfrMaxOt
 
int xfrOUT
 

Static Public Attributes

static const int cmdAlloc = 0x0001
 
static const int cmdMDP = 0x0002
 
static const int cmdRME = 0x0010
 
static const int cmdStats = 0x0004
 
static const int cmdXPD = 0x0008
 
static const int pVecMax =8
 

Detailed Description

Definition at line 53 of file XrdFrmConfig.hh.


Class Documentation

◆ XrdFrmConfig::Cmd

struct XrdFrmConfig::Cmd

Definition at line 72 of file XrdFrmConfig.hh.

+ Collaboration diagram for XrdFrmConfig::Cmd:
Class Members
const char * Desc
int Opts
char * theCmd
XrdOucMsubs * theVec
int TLimit

Member Enumeration Documentation

◆ PPVar

Enumerator
PP_atime 
PP_ctime 
PP_fname 
PP_fsize 
PP_fspace 
PP_mtime 
PP_pfn 
PP_sname 
PP_tspace 
PP_usage 

Definition at line 155 of file XrdFrmConfig.hh.

◆ SubSys

Enumerator
ssAdmin 
ssMigr 
ssPstg 
ssPurg 
ssXfr 

Definition at line 175 of file XrdFrmConfig.hh.

Constructor & Destructor Documentation

◆ XrdFrmConfig()

XrdFrmConfig::XrdFrmConfig ( SubSys ss,
const char * vopts,
const char * uinfo )

Definition at line 136 of file XrdFrmConfig.cc.

137 : dfltPolicy("*", -2, -3, 72000, 0)
138{
139 static XrdVERSIONINFODEF(myVer, XrdFrm, XrdVNUMBER, XrdVERSION);
140 char *sP, buff[128];
141
142// Preset all variables with common defaults
143//
144 myVersion= &myVer;
145 mySite = 0;
146 vOpts = vopts;
147 uInfo = uinfo;
148 ssID = ss;
149 AdminPath= 0;
150 QPath = 0;
151 AdminMode= 0740;
152 xfrMax = 2;
153 xfrMaxIn = 0;
154 xfrMaxOt = 0;
155 FailHold = 3*60*60;
156 IdleHold = 10*60;
157 WaitMigr = 60*60;
158 WaitPurge= 600;
159 WaitQChk = 300;
160 MSSCmd = 0;
161 memset(&xfrCmd, 0, sizeof(xfrCmd));
162 xfrCmd[0].Desc = "copycmd in"; xfrCmd[1].Desc = "copycmd out";
163 xfrCmd[2].Desc = "copycmd in url"; xfrCmd[3].Desc = "copycmd out url";
164 xfrIN = xfrOUT = 0;
165 isAgent = (getenv("XRDADMINPATH") ? 1 : 0);
166 OfsCfg = 0;
167 cmsPath = 0;
168 haveCMS = 0;
169 isOTO = 0;
170 Test = 0;
171 Verbose = 0;
172 pathList = 0;
173 spacList = 0;
174 lockFN = "DIR_LOCK"; // May be ".DIR_LOCK" if hidden
175 cmdHold = -1;
176 cmdFree = 0;
177 pVecNum = 0;
178 pProg = 0;
179 Fix = 0;
180 dirHold = 40*60*60;
181 runOld = 0;
182 runNew = 1;
183 nonXA = 0;
184 doStatPF = 0;
185
186 myUid = geteuid();
187 myGid = getegid();
188
189 LocalRoot= RemoteRoot = 0;
190 lcl_N2N = rmt_N2N = the_N2N = 0;
191 N2N_Lib = N2N_Parms = 0;
192 CksMan = 0;
193
194 xfrFdir = 0;
195 xfrFdln = 0;
196
197// Establish our instance name
198//
200
201// Establish default config file
202//
203 if (!(sP = getenv("XRDCONFIGFN")) || !*sP)
204 ConfigFN = 0;
205 else {ConfigFN = strdup(sP); isAgent = 1;}
206
207// Establish directive prefix
208//
209 if (ss == ssAdmin) {myFrmid = "admin"; myFrmID = "ADMIN";}
210 else if (ss == ssPurg) {myFrmid = "purge"; myFrmID = "PURG";}
211 else if (ss == ssXfr) {myFrmid = "xfr"; myFrmID = "XFR"; }
212 else {myFrmid = "frm"; myFrmID = "FRM";}
213
214// Set correct error prefix
215//
216 strcpy(buff, myFrmid);
217 strcat(buff, "_");
218 Say.SetPrefix(strdup(buff));
219
220// Set correct option prefix
221//
222 strcpy(buff, "frm.");
223 strcat(buff, myFrmid);
224 strcat(buff, ".");
225 pfxDTS = strdup(buff); plnDTS = strlen(buff);
226}
XrdOucPup XrdCmsParser::Pup & Say
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
struct XrdFrmConfig::Cmd xfrCmd[4]
XrdOfsConfigPI * OfsCfg
XrdNetCmsNotify * cmsPath
const char * myInst
XrdCks * CksMan
const char * mySite
VPInfo * pathList
const char * myFrmID
const char * Desc
XrdOucTList * spacList
const char * myFrmid
long long cmdFree
XrdOucName2Name * the_N2N
const char * lockFN
static const char * InstName(int TranOpt=0)

References AdminMode, AdminPath, CksMan, cmdFree, cmdHold, cmsPath, XrdFrmConfig::Cmd::Desc, dirHold, FailHold, Fix, haveCMS, IdleHold, XrdOucUtils::InstName(), isAgent, isOTO, lockFN, MSSCmd, myFrmID, myFrmid, myGid, myInst, mySite, myUid, nonXA, OfsCfg, pathList, pProg, pVecNum, QPath, runNew, runOld, Say, spacList, ssAdmin, ssPurg, ssXfr, Test, the_N2N, Verbose, WaitMigr, WaitPurge, WaitQChk, xfrCmd, xfrFdir, xfrFdln, xfrIN, xfrMax, xfrMaxIn, xfrMaxOt, xfrOUT, and XrdVERSIONINFODEF().

+ Here is the call graph for this function:

◆ ~XrdFrmConfig()

XrdFrmConfig::~XrdFrmConfig ( )
inline

Definition at line 178 of file XrdFrmConfig.hh.

178{}

Member Function Documentation

◆ Configure()

int XrdFrmConfig::Configure ( int argc,
char ** argv,
int(* ppf )() )

Definition at line 232 of file XrdFrmConfig.cc.

233{
234 extern XrdOss *XrdOssGetSS(XrdSysLogger *, const char *, const char *,
235 const char *, XrdOucEnv *, XrdVersionInfo &);
236 static XrdNetAddr myAddr(0);
237 XrdFrmConfigSE theSE;
238 int retc, isMum = 0, myXfrMax = -1, NoGo = 0, optBG = 0;
239 const char *temp;
240 char c, buff[1024], *logfn = 0;
241 extern char *optarg;
242 extern int opterr, optopt;
243 int pipeFD[2] = {-1, -1}, bindArg = -1, pureLFN = 0;
244 const char *pidFN = 0;
245
246// Obtain the program name (used for logging)
247//
248 retc = strlen(argv[0]);
249 while(retc--) if (argv[0][retc] == '/') break;
250 myProg = &argv[0][retc+1];
251 vectArg = argv; numcArg = argc;
252
253// Process the options
254//
255 opterr = 0; nextArg = 1;
256 while(nextArg < argc && '-' == *argv[nextArg]
257 && (c=getopt(argc,argv,vOpts)) && (c != (char)-1))
258 { switch(c)
259 {
260 case 'b': optBG = 1;
261 break;
262 case 'c': if (ConfigFN) free(ConfigFN);
263 ConfigFN = strdup(optarg);
264 break;
265 case 'd': Trace.What |= TRACE_ALL;
266 XrdOucEnv::Export("XRDDEBUG","1");
267 break;
268 case 'f': Fix = 1;
269 break;
270 case 'h': Usage(0);
271 break;
272 case 'k': if (!(bindArg = Say.logger()->ParseKeep(optarg)))
273 {Say.Emsg("Config","Invalid -k argument -",optarg);
274 Usage(1);
275 }
276 break;
277 case 'l': if ((pureLFN = *optarg == '=')) optarg++;
278 if (!*optarg)
279 {Say.Emsg("Config", "Logfile name not specified.");
280 Usage(1);
281 }
282 if (logfn) free(logfn);
283 logfn = strdup(optarg);
284 break;
285 case 'm': if (XrdOuca2x::a2i(Say,"max number",optarg,&myXfrMax))
286 Usage(1);
287 break;
288 case 'n': myInst = (!strcmp(optarg,"anon")||!strcmp(optarg,"default")
289 ? 0 : optarg);
290 break;
291 case 'O': isOTO = 1;
292 if (!ConfigOTO(optarg)) Usage(1);
293 break;
294 case 'T': Test = 1;
295 break;
296 case 'v': Verbose = 1;
297 break;
298 case 'w': if (XrdOuca2x::a2tm(Say,"wait time",optarg,&WaitPurge))
299 Usage(1);
300 break;
301 case 's': pidFN = optarg;
302 break;
303 case 'S': mySite= optarg;
304 break;
305 case 'z': Say.logger()->setHiRes();
306 break;
307 default: sprintf(buff,"'%c'", optopt);
308 if (c == ':') Say.Emsg("Config", buff, "value not specified.");
309 else Say.Emsg("Config", buff, "option is invalid");
310 Usage(1);
311 }
312 nextArg = optind;
313 }
314
315// Set the site name if we have it at this point
316//
318
319// If we are an agent without a logfile and one is actually defined for the
320// underlying system, use the directory of the underlying system.
321//
322 if (ssID != ssAdmin)
323 {if (!logfn)
324 {if (isAgent && (logfn = getenv("XRDLOGDIR")))
325 {snprintf(buff, sizeof(buff), "%s%s%clog", logfn, myFrmid,
326 (isAgent ? 'a' : 'd'));
327 logfn = strdup(buff);
328 }
329 } else if (!pureLFN
330 && !(logfn=XrdOucUtils::subLogfn(Say,myInst,logfn))) _exit(16);
331
332 // If undercover desired and we are not an agent, do so
333 //
334 if (optBG && !isAgent)
335 {
336#ifdef WIN32
337 XrdOucUtils::Undercover( Say, !logfn );
338#else
339 if (pipe( pipeFD ) == -1)
340 {Say.Emsg("Config", errno, "create a pipe"); exit(17);}
341 XrdOucUtils::Undercover( Say, !logfn, pipeFD );
342#endif
343 }
344
345 // Bind the log file if we have one
346 //
347 if (logfn)
348 {Say.logger()->AddMsg(XrdBANNER);
349 if (Say.logger()->Bind(logfn, bindArg)) _exit(19);
350 }
351 }
352
353// Get the full host name. In theory, we should always get some kind of name.
354//
355 if (!(myName = myAddr.Name()))
356 {Say.Emsg("Config","Unable to determine host name; execution terminated.");
357 _exit(16);
358 }
359
360// Set the Environmental variables to hold some config information
361// XRDINSTANCE=<pgm> <instance name>@<host name>
362//
363 snprintf(buff,sizeof(buff), "XRDINSTANCE=%s %s@%s",myProg,
365 putenv(strdup(buff)); // XRDINSTANCE
366 myInstance = strdup(index(buff,'=')+1);
367 XrdOucEnv::Export("XRDHOST", myName);
368 XrdOucEnv::Export("XRDPROG", myProg);
370
371// We need to divert the output if we are in admin mode with no logfile
372//
373 if (!logfn && (ssID == ssAdmin || isOTO) && !Trace.What)
374 isMum = ConfigMum(theSE);
375
376// Add final message to the logger
377//
378 if (logfn)
379 {char msgBuff[2048];
380 strcpy(msgBuff, myInstance); strcat(msgBuff, " running.");
381 Say.logger()->AddMsg(msgBuff);
382 }
383
384// Put out the herald
385//
386 sprintf(buff, "File Residency Manager %s is starting. . .", myProg);
387 Say.Say(0, buff);
388 Say.Say(XrdBANNER);
389
390// Process the configuration file.
391//
392 Say.Say("++++++ ", myInstance, " initialization started.");
393 if (!ConfigFN || !*ConfigFN) ConfigFN = strdup("/opt/xrootd/etc/xrootd.cf");
394 Say.Say("Config using configuration file ", ConfigFN);
395 NoGo = ConfigProc();
396
397// Create the correct admin path
398//
399 if (!NoGo) NoGo = ConfigPaths();
400
401// Obtain and configure the oss (lightweight option only)
402//
403 if (!isAgent)
404 {XrdOucEnv::Export("XRDREDIRECT", "Q");
405 XrdOucEnv::Export("XRDOSSTYPE", myFrmID);
406 if (ssID == ssPurg) XrdOucEnv::Export("XRDOSSCSCAN", "off");
407 if (!NoGo)
409 if (ssID == ssAdmin) loadPI |= XrdOfsConfigPI::theCksLib;
410 if (!OfsCfg->Load(loadPI)) NoGo = 1;
411 else {struct stat Stat;
414 doStatPF = ossFS->StatPF("/", &Stat) != -ENOTSUP;
415 }
416 }
417 }
418
419// Now we can create a home directory for core files and do a cwd to it
420//
422
423// Configure each specific component
424//
425 if (!NoGo) switch(ssID)
426 {case ssAdmin: NoGo = (ConfigN2N() || ConfigMss());
427 break;
428 case ssPurg: if (!(NoGo = (ConfigMon(0) || ConfigMP("purgeable"))))
429 ConfigPF("frm_purged");
430 break;
431 case ssXfr: if (!isAgent && !(NoGo = (ConfigMon(1) || ConfigXfr())))
432 ConfigPF("frm_xfrd");
433 break;
434 default: break;
435 }
436
437// If we have a post-processing routine, invoke it
438//
439 if (!NoGo && ppf) NoGo = ppf();
440
441 // if we call this it means that the daemon has forked and we are
442 // in the child process
443#ifndef WIN32
444 if (optBG && !isAgent)
445 {
446 if (pidFN && !XrdOucUtils::PidFile( Say, pidFN ) )
447 NoGo = 1;
448
449 int status = NoGo ? 1 : 0;
450 if(write( pipeFD[1], &status, sizeof( status ) )) {};
451 close( pipeFD[1]);
452 }
453#endif
454
455// Print ending message
456//
457 temp = (NoGo ? " initialization failed." : " initialization completed.");
458 Say.Say("------ ", myInstance, temp);
459
460// Finish up mum processing
461//
462 if (isMum)
463 {close(STDERR_FILENO);
464 theSE.mySem.Wait();
465 if (NoGo && write(STDERR_FILENO, theSE.Buff, theSE.BLen)) {}
466 }
467
468// All done
469//
470 if (OfsCfg) delete OfsCfg;
471 return !NoGo;
472}
struct stat Stat
Definition XrdCks.cc:49
#define XrdBANNER
Definition XrdInfo.hh:38
int optopt
int optind
XrdOss * XrdOssGetSS(XrdSysLogger *Logger, const char *config_fn, const char *OssLib, const char *OssParms, XrdOucEnv *envP, XrdVersionInfo &urVer)
Definition XrdOssApi.cc:98
#define close(a)
Definition XrdPosix.hh:43
#define write(a, b, c)
Definition XrdPosix.hh:110
#define stat(a, b)
Definition XrdPosix.hh:96
#define TRACE_ALL
Definition XrdTrace.hh:35
char Buff[32000]
XrdSysSemaphore mySem
char * myInstance
XrdOss * ossFS
const char * myProg
const char * myName
bool Plugin(XrdAccAuthorize *&piP)
Get Authorization plugin.
bool Load(int what, XrdOucEnv *envP=0)
@ theOssLib
Oss plugin.
@ theCksLib
Checksum manager plugin.
@ theAtrLib
Extended attribute plugin.
virtual int StatPF(const char *path, struct stat *buff, int opts)
Definition XrdOss.cc:107
static int Export(const char *Var, const char *Val)
Definition XrdOucEnv.cc:170
static const char * Set(const char *name, int maxlen=15)
static bool PidFile(XrdSysError &eDest, const char *path)
static void makeHome(XrdSysError &eDest, const char *inst)
static void Undercover(XrdSysError &eDest, int noLog, int *pipeFD=0)
static char * subLogfn(XrdSysError &eDest, const char *inst, char *logfn)
static int a2i(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:45
static int a2tm(XrdSysError &, const char *emsg, const char *item, int *val, int minv=-1, int maxv=-1)
Definition XrdOuca2x.cc:288
XrdOucTrace Trace

References XrdOuca2x::a2i(), XrdOuca2x::a2tm(), XrdFrmConfigSE::BLen, XrdFrmConfigSE::Buff, CksMan, close, XrdOucEnv::Export(), Fix, XrdOucUtils::InstName(), isAgent, isOTO, XrdOfsConfigPI::Load(), XrdOucUtils::makeHome(), myFrmID, myFrmid, myInst, myInstance, myName, myProg, XrdFrmConfigSE::mySem, mySite, XrdNetAddrInfo::Name(), nextArg, numcArg, OfsCfg, optind, optopt, ossFS, XrdOucUtils::PidFile(), XrdOfsConfigPI::Plugin(), Say, XrdOucSiteName::Set(), ssAdmin, ssPurg, ssXfr, Stat, stat, XrdOss::StatPF(), XrdOucUtils::subLogfn(), Test, XrdOfsConfigPI::theAtrLib, XrdOfsConfigPI::theCksLib, XrdOfsConfigPI::theOssLib, XrdFrc::Trace, TRACE_ALL, XrdOucUtils::Undercover(), vectArg, Verbose, XrdSysSemaphore::Wait(), WaitPurge, XrdOucTrace::What, write, XrdBANNER, and XrdOssGetSS().

Referenced by main().

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

◆ LocalPath()

int XrdFrmConfig::LocalPath ( const char * oldp,
char * newp,
int newpsz )

Definition at line 478 of file XrdFrmConfig.cc.

479{
480 int rc = 0;
481
482 if (lcl_N2N) rc = lcl_N2N->lfn2pfn(oldp, newp, newpsz);
483 else if (((int)strlen(oldp)) >= newpsz) rc = ENAMETOOLONG;
484 else strcpy(newp, oldp);
485 if (rc) {Say.Emsg("Config", rc, "generate local path from", oldp);
486 return 0;
487 }
488 return 1;
489}
virtual int lfn2pfn(const char *lfn, char *buff, int blen)=0

References XrdOucName2Name::lfn2pfn(), and Say.

Referenced by XrdFrmXfrQueue::Add(), and XrdFrmAdmin::Chksum().

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

◆ LogicalPath()

int XrdFrmConfig::LogicalPath ( const char * oldp,
char * newp,
int newpsz )

Definition at line 495 of file XrdFrmConfig.cc.

496{
497 int rc = 0;
498
499 if (lcl_N2N) rc = lcl_N2N->pfn2lfn(oldp, newp, newpsz);
500 else if (((int)strlen(oldp)) >= newpsz) rc = ENAMETOOLONG;
501 else strcpy(newp, oldp);
502 if (rc) {Say.Emsg("Config", rc, "generate logical path from", oldp);
503 return 0;
504 }
505 return 1;
506}
virtual int pfn2lfn(const char *pfn, char *buff, int blen)=0

References XrdOucName2Name::pfn2lfn(), and Say.

Referenced by XrdFrmMigrate::Queue().

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

◆ NeedsCTA()

int XrdFrmConfig::NeedsCTA ( const char * Lfn)

Definition at line 512 of file XrdFrmConfig.cc.

513{
515
516 return (XrdOssRPList->Find(Lfn) & XRDEXP_MIGPRG) != 0;
517}
XrdOucPListAnchor * XrdOssRPList
#define XRDEXP_MIGPRG
unsigned long long Find(const char *pathname)

References XrdOucPListAnchor::Find(), XRDEXP_MIGPRG, and XrdOssRPList.

+ Here is the call graph for this function:

◆ PathOpts()

unsigned long long XrdFrmConfig::PathOpts ( const char * Lfn)

Definition at line 523 of file XrdFrmConfig.cc.

524{
526
527 return XrdOssRPList->Find(Lfn);
528}

References XrdOucPListAnchor::Find(), and XrdOssRPList.

+ Here is the call graph for this function:

◆ RemotePath()

int XrdFrmConfig::RemotePath ( const char * oldp,
char * newp,
int newpsz )

Definition at line 534 of file XrdFrmConfig.cc.

535{
536 int rc = 0;
537
538 if (rmt_N2N) rc = rmt_N2N->lfn2rfn(oldp, newp, newpsz);
539 else if (((int)strlen(oldp)) >= newpsz) rc = ENAMETOOLONG;
540 else strcpy(newp, oldp);
541 if (rc) {Say.Emsg("Config", rc, "generate rmote path from", oldp);
542 return 0;
543 }
544 return 1;
545}
virtual int lfn2rfn(const char *lfn, char *buff, int blen)=0

References XrdOucName2Name::lfn2rfn(), and Say.

+ Here is the call graph for this function:

◆ Space()

XrdOucTList * XrdFrmConfig::Space ( const char * Name,
const char * Path = 0 )

Definition at line 551 of file XrdFrmConfig.cc.

552{
553 static XrdOucTList nullEnt;
554 struct VPInfo *vP = VPList;
555 XrdOucTList *tP;
556 char buff[1032];
557 int n;
558
559// First find the space entry
560//
561 while(vP && strcmp(vP->Name, Name)) vP = vP->Next;
562 if (!vP) return 0;
563
564// Check if we should find a particular path
565//
566 if (!Path) return vP->Dir;
567
568// Make sure it nds with a slash (it usually does not)
569//
570 n = strlen(Path)-1;
571 if (Path[n] != '/')
572 {if (n >= (int)sizeof(buff)-2) return &nullEnt;
573 strcpy(buff, Path); buff[n+1] = '/'; buff[n+2] = '\0';
574 Path = buff;
575 }
576
577// Find the path
578//
579 tP = vP->Dir;
580 while(tP && strcmp(Path, tP->text)) tP = tP->next;
581 return (tP ? tP : &nullEnt);
582}
XrdOucString Path
struct XrdFrmConfig::VPInfo * VPList
XrdOucTList * next

References XrdFrmConfig::VPInfo::Dir, XrdFrmConfig::VPInfo::Name, XrdFrmConfig::VPInfo::Next, XrdOucTList::next, Path, XrdOucTList::text, and VPList.

◆ Stat()

int XrdFrmConfig::Stat ( const char * xLfn,
const char * xPfn,
struct stat * buff )

Definition at line 588 of file XrdFrmConfig.cc.

589{
590 return (doStatPF ? ossFS->StatPF(xPfn, buff)
591 : ossFS->Stat (xLfn, buff, XRDOSS_resonly));
592}
#define XRDOSS_resonly
Definition XrdOss.hh:486
virtual int Stat(const char *path, struct stat *buff, int opts=0, XrdOucEnv *envP=0)=0

References ossFS, XrdOss::Stat(), XrdOss::StatPF(), and XRDOSS_resonly.

Referenced by XrdFrmXfrQueue::Add().

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

Member Data Documentation

◆ AdminMode

int XrdFrmConfig::AdminMode

◆ AdminPath

char* XrdFrmConfig::AdminPath

Definition at line 64 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), XrdFrmXfrQueue::Init(), and mainConfig().

◆ CksMan

XrdCks* XrdFrmConfig::CksMan

Definition at line 89 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), XrdFrmAdmin::Chksum(), and Configure().

◆ cmdAlloc

const int XrdFrmConfig::cmdAlloc = 0x0001
static

Definition at line 79 of file XrdFrmConfig.hh.

◆ cmdFree

long long XrdFrmConfig::cmdFree

Definition at line 95 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and mainConfig().

◆ cmdHold

int XrdFrmConfig::cmdHold

Definition at line 96 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and mainConfig().

◆ cmdMDP

const int XrdFrmConfig::cmdMDP = 0x0002
static

Definition at line 80 of file XrdFrmConfig.hh.

◆ cmdRME

const int XrdFrmConfig::cmdRME = 0x0010
static

Definition at line 83 of file XrdFrmConfig.hh.

◆ cmdStats

const int XrdFrmConfig::cmdStats = 0x0004
static

Definition at line 81 of file XrdFrmConfig.hh.

◆ cmdXPD

const int XrdFrmConfig::cmdXPD = 0x0008
static

Definition at line 82 of file XrdFrmConfig.hh.

◆ cmsPath

XrdNetCmsNotify* XrdFrmConfig::cmsPath

Definition at line 92 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ dfltPolicy

Policy XrdFrmConfig::dfltPolicy

Definition at line 145 of file XrdFrmConfig.hh.

Referenced by mainConfig().

◆ dirHold

int XrdFrmConfig::dirHold

Definition at line 147 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmPurge::Display().

◆ FailHold

int XrdFrmConfig::FailHold

Definition at line 102 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmTransfer::checkFF().

◆ Fix

int XrdFrmConfig::Fix

Definition at line 109 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), Configure(), mainConfig(), and XrdFrmFileset::Screen().

◆ hasCache

int XrdFrmConfig::hasCache

Definition at line 116 of file XrdFrmConfig.hh.

◆ haveCMS

int XrdFrmConfig::haveCMS

Definition at line 107 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ IdleHold

int XrdFrmConfig::IdleHold

Definition at line 103 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmXfrDaemon::Init().

◆ isAgent

int XrdFrmConfig::isAgent

Definition at line 98 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), Configure(), main(), and mainConfig().

◆ isOTO

int XrdFrmConfig::isOTO

Definition at line 108 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), Configure(), main(), and mainConfig().

◆ lockFN

const char* XrdFrmConfig::lockFN

Definition at line 63 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ MSSCmd

char* XrdFrmConfig::MSSCmd

Definition at line 69 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ MSSProg

XrdOucProg* XrdFrmConfig::MSSProg

Definition at line 70 of file XrdFrmConfig.hh.

◆ myFrmID

const char* XrdFrmConfig::myFrmID

Definition at line 62 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and Configure().

◆ myFrmid

const char* XrdFrmConfig::myFrmid

Definition at line 61 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and Configure().

◆ myGid

gid_t XrdFrmConfig::myGid

Definition at line 94 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ myInst

const char* XrdFrmConfig::myInst

Definition at line 59 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and Configure().

◆ myInstance

char* XrdFrmConfig::myInstance

Definition at line 67 of file XrdFrmConfig.hh.

Referenced by Configure().

◆ myName

const char* XrdFrmConfig::myName

Definition at line 58 of file XrdFrmConfig.hh.

Referenced by Configure().

◆ myProg

const char* XrdFrmConfig::myProg

Definition at line 57 of file XrdFrmConfig.hh.

Referenced by Configure(), XrdFrmXfrDaemon::Init(), and XrdFrmMigrate::Queue().

◆ mySite

const char* XrdFrmConfig::mySite

Definition at line 60 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and Configure().

◆ myUid

uid_t XrdFrmConfig::myUid

Definition at line 93 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ nextArg

int XrdFrmConfig::nextArg

Definition at line 118 of file XrdFrmConfig.hh.

Referenced by Configure(), and main().

◆ nonXA

int XrdFrmConfig::nonXA

Definition at line 115 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ numcArg

int XrdFrmConfig::numcArg

Definition at line 119 of file XrdFrmConfig.hh.

Referenced by Configure().

◆ OfsCfg

XrdOfsConfigPI* XrdFrmConfig::OfsCfg

Definition at line 88 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and Configure().

◆ ossFS

XrdOss* XrdFrmConfig::ossFS

◆ pathList

VPInfo* XrdFrmConfig::pathList

◆ PidPath

char* XrdFrmConfig::PidPath

Definition at line 66 of file XrdFrmConfig.hh.

◆ pProg

char* XrdFrmConfig::pProg

Definition at line 151 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmPurge::Init().

◆ pVec

char XrdFrmConfig::pVec[pVecMax]

Definition at line 150 of file XrdFrmConfig.hh.

Referenced by XrdFrmPurge::Init().

◆ pVecMax

const int XrdFrmConfig::pVecMax =8
static

Definition at line 149 of file XrdFrmConfig.hh.

◆ pVecNum

int XrdFrmConfig::pVecNum

Definition at line 148 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmPurge::Init().

◆ QPath

char* XrdFrmConfig::QPath

◆ runNew

int XrdFrmConfig::runNew

Definition at line 114 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), XrdFrmFileset::Screen(), and XrdFrmFileset::setCpyTime().

◆ runOld

int XrdFrmConfig::runOld

Definition at line 113 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ spacList

XrdOucTList* XrdFrmConfig::spacList

Definition at line 131 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and mainConfig().

◆ StopPurge

char* XrdFrmConfig::StopPurge

Definition at line 68 of file XrdFrmConfig.hh.

Referenced by main().

◆ Test

int XrdFrmConfig::Test

◆ the_N2N

XrdOucName2Name* XrdFrmConfig::the_N2N

Definition at line 90 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ TrackDC

int XrdFrmConfig::TrackDC

Definition at line 111 of file XrdFrmConfig.hh.

◆ vectArg

char** XrdFrmConfig::vectArg

Definition at line 117 of file XrdFrmConfig.hh.

Referenced by Configure().

◆ Verbose

int XrdFrmConfig::Verbose

◆ VPList

struct XrdFrmConfig::VPInfo * XrdFrmConfig::VPList

◆ WaitMigr

int XrdFrmConfig::WaitMigr

Definition at line 106 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), XrdFrmXfrDaemon::Init(), and XrdFrmMigrate::Migrate().

◆ WaitPurge

int XrdFrmConfig::WaitPurge

Definition at line 105 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), Configure(), and main().

◆ WaitQChk

int XrdFrmConfig::WaitQChk

Definition at line 104 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmXfrDaemon::Start().

◆ xfrCmd

struct XrdFrmConfig::Cmd XrdFrmConfig::xfrCmd[4]

◆ xfrFdir

char* XrdFrmConfig::xfrFdir

Definition at line 152 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ xfrFdln

int XrdFrmConfig::xfrFdln

Definition at line 153 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ xfrIN

int XrdFrmConfig::xfrIN

Definition at line 85 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig().

◆ xfrMax

int XrdFrmConfig::xfrMax

Definition at line 99 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), XrdFrmTransfer::Init(), and XrdFrmXfrQueue::Init().

◆ xfrMaxIn

int XrdFrmConfig::xfrMaxIn

Definition at line 100 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmTransfer::Init().

◆ xfrMaxOt

int XrdFrmConfig::xfrMaxOt

Definition at line 101 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmTransfer::Init().

◆ xfrOUT

int XrdFrmConfig::xfrOUT

Definition at line 86 of file XrdFrmConfig.hh.

Referenced by XrdFrmConfig(), and XrdFrmXfrDaemon::Init().


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