XRootD
XrdThrottleFileSystemConfig.cc File Reference
#include <fcntl.h>
#include "XrdVersion.hh"
#include "XrdSys/XrdSysPlugin.hh"
#include "XrdSys/XrdSysLogger.hh"
#include "XrdOuc/XrdOuca2x.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOuc/XrdOucStream.hh"
#include "XrdThrottle/XrdThrottle.hh"
#include "XrdThrottle/XrdThrottleConfig.hh"
#include "XrdThrottle/XrdThrottleTrace.hh"
+ 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 XrdSfsFileSystem * LoadFS (const std::string &fslib, XrdSysError &eDest, const std::string &config_file)
 
XrdSfsFileSystem * XrdSfsGetFileSystem (XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn)
 
XrdSfsFileSystem * XrdSfsGetFileSystem2 (XrdSfsFileSystem *native_fs, XrdSysLogger *lp, const char *configfn, XrdOucEnv *envP)
 
XrdSfsFileSystem * XrdThrottle::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 18 of file XrdThrottleFileSystemConfig.cc.

◆ TS_Xeq

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

Definition at line 140 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 25 of file XrdThrottleFileSystemConfig.cc.

25  {
26  // Load the library
27  XrdSysPlugin ofsLib(&eDest, fslib.c_str(), "fslib", NULL);
28  XrdSfsFileSystem *fs;
29  if (fslib == OFS_NAME)
30  {
32  XrdSysLogger *lp,
33  const char *configfn,
34  XrdOucEnv *EnvInfo);
35 
36  if (!(fs = XrdSfsGetDefaultFileSystem(0, eDest.logger(), config_file.c_str(), 0)))
37  {
38  eDest.Emsg("Config", "Unable to load OFS filesystem.");
39  }
40  }
41  else
42  {
43  XrdSfsFileSystem *(*ep)(XrdSfsFileSystem *, XrdSysLogger *, const char *);
44  if (!(ep = (XrdSfsFileSystem *(*)(XrdSfsFileSystem *,XrdSysLogger *,const char *))
45  ofsLib.getPlugin("XrdSfsGetFileSystem")))
46  return NULL;
47  if (!(fs = (*ep)(0, eDest.logger(), config_file.c_str())))
48  {
49  eDest.Emsg("Config", "Unable to create file system object via", fslib.c_str());
50  return NULL;
51  }
52  }
53  ofsLib.Persist();
54 
55  return fs;
56 }
XrdSysError eDest(0, "HttpMon")
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:116
XrdSysLogger * logger(XrdSysLogger *lp=0)
Definition: XrdSysError.hh:175

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

+ Here is the call graph for this function:

◆ XrdSfsGetFileSystem()

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

Definition at line 81 of file XrdThrottleFileSystemConfig.cc.

84 {
85  return XrdSfsGetFileSystem_Internal(native_fs, lp, configfn, nullptr);
86 }
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 89 of file XrdThrottleFileSystemConfig.cc.

93 {
94  return XrdSfsGetFileSystem_Internal(native_fs, lp, configfn, envP);
95 }
XrdOucEnv * envP
Definition: XrdPss.cc:110

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   
)