XRootD
XrdThrottleFileSystemConfig.cc File Reference
+ Include dependency graph for XrdThrottleFileSystemConfig.cc:

Go to the source code of this file.

Namespaces

 XrdThrottle
 

Macros

#define OFS_NAME   "libXrdOfs.so"
 
#define TS_Xeq(key, func)   NoGo = (strcmp(key, var) == 0) ? func(Config) : 0
 

Functions

static XrdSfsFileSystemLoadFS (const std::string &fslib, XrdSysError &eDest, const std::string &config_file)
 
XrdSfsFileSystemXrdSfsGetFileSystem (XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn)
 
XrdSfsFileSystemXrdSfsGetFileSystem2 (XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn, XrdOucEnv *envP)
 
XrdSfsFileSystemXrdThrottle::XrdSfsGetFileSystem_Internal (XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn, XrdOucEnv *envP)
 
 XrdVERSIONINFO (XrdSfsGetFileSystem, FileSystem)
 
 XrdVERSIONINFO (XrdSfsGetFileSystem2, FileSystem)
 

Macro Definition Documentation

◆ OFS_NAME

#define OFS_NAME   "libXrdOfs.so"

Definition at line 14 of file XrdThrottleFileSystemConfig.cc.

◆ TS_Xeq

#define TS_Xeq (   key,
  func 
)    NoGo = (strcmp(key, var) == 0) ? func(Config) : 0

Definition at line 129 of file XrdThrottleFileSystemConfig.cc.

Function Documentation

◆ LoadFS()

static XrdSfsFileSystem* LoadFS ( const std::string &  fslib,
XrdSysError eDest,
const std::string &  config_file 
)
static

Definition at line 21 of file XrdThrottleFileSystemConfig.cc.

21  {
22  // Load the library
23  XrdSysPlugin ofsLib(&eDest, fslib.c_str(), "fslib", NULL);
24  XrdSfsFileSystem *fs;
25  if (fslib == OFS_NAME)
26  {
28  XrdSysLogger *lp,
29  const char *configfn,
30  XrdOucEnv *EnvInfo);
31 
32  if (!(fs = XrdSfsGetDefaultFileSystem(0, eDest.logger(), config_file.c_str(), 0)))
33  {
34  eDest.Emsg("Config", "Unable to load OFS filesystem.");
35  }
36  }
37  else
38  {
39  XrdSfsFileSystem *(*ep)(XrdSfsFileSystem *, XrdSysLogger *, const char *);
40  if (!(ep = (XrdSfsFileSystem *(*)(XrdSfsFileSystem *,XrdSysLogger *,const char *))
41  ofsLib.getPlugin("XrdSfsGetFileSystem")))
42  return NULL;
43  if (!(fs = (*ep)(0, eDest.logger(), config_file.c_str())))
44  {
45  eDest.Emsg("Config", "Unable to create file system object via", fslib.c_str());
46  return NULL;
47  }
48  }
49  ofsLib.Persist();
50 
51  return fs;
52 }
static XrdSysError eDest(0,"crypto_")
XrdSfsFileSystem * XrdSfsGetDefaultFileSystem(XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn, XrdOucEnv *EnvInfo)
Definition: XrdOfsFS.cc:49
#define OFS_NAME
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
Definition: XrdSysError.cc:95
XrdSysLogger * logger(XrdSysLogger *lp=0)
Definition: XrdSysError.hh:141

References eDest, XrdSysError::Emsg(), XrdSysPlugin::getPlugin(), XrdSysError::logger(), OFS_NAME, XrdSysPlugin::Persist(), and XrdSfsGetDefaultFileSystem().

Referenced by XrdThrottle::FileSystem::Configure().

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

◆ XrdSfsGetFileSystem()

XrdSfsFileSystem* XrdSfsGetFileSystem ( XrdSfsFileSystem native_fs,
XrdSysLogger lp,
const char *  configfn 
)

Definition at line 70 of file XrdThrottleFileSystemConfig.cc.

73 {
74  return XrdSfsGetFileSystem_Internal(native_fs, lp, configfn, nullptr);
75 }
XrdSfsFileSystem * XrdSfsGetFileSystem_Internal(XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn, XrdOucEnv *envP)

References XrdThrottle::XrdSfsGetFileSystem_Internal().

+ Here is the call graph for this function:

◆ XrdSfsGetFileSystem2()

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

Definition at line 78 of file XrdThrottleFileSystemConfig.cc.

82 {
83  return XrdSfsGetFileSystem_Internal(native_fs, lp, configfn, envP);
84 }
XrdOucEnv * envP
Definition: XrdPss.cc:109

References XrdProxy::envP, and XrdThrottle::XrdSfsGetFileSystem_Internal().

+ Here is the call graph for this function:

◆ XrdVERSIONINFO() [1/2]

XrdVERSIONINFO ( XrdSfsGetFileSystem  ,
FileSystem   
)

◆ XrdVERSIONINFO() [2/2]

XrdVERSIONINFO ( XrdSfsGetFileSystem2  ,
FileSystem   
)