XRootD
XrdOssThrottleFile.cc File Reference
#include "XrdOuc/XrdOucEnv.hh"
#include <XrdOuc/XrdOucGatherConf.hh>
#include "XrdOss/XrdOss.hh"
#include "XrdOss/XrdOssWrapper.hh"
#include "XrdSfs/XrdSfsAio.hh"
#include "XrdSys/XrdSysLogger.hh"
#include "XrdThrottle/XrdThrottleConfig.hh"
#include "XrdThrottle/XrdThrottleManager.hh"
#include "XrdThrottle/XrdThrottleTrace.hh"
#include "XrdVersion.hh"
#include <functional>
+ Include dependency graph for XrdOssThrottleFile.cc:

Go to the source code of this file.

Functions

XrdOssXrdOssAddStorageSystem2 (XrdOss *curr_oss, XrdSysLogger *logger, const char *config_fn, const char *parms, XrdOucEnv *envP)
 
 XrdVERSIONINFO (XrdOssAddStorageSystem2, throttle)
 

Function Documentation

◆ XrdOssAddStorageSystem2()

XrdOss* XrdOssAddStorageSystem2 ( XrdOss curr_oss,
XrdSysLogger logger,
const char *  config_fn,
const char *  parms,
XrdOucEnv envP 
)

Definition at line 221 of file XrdOssThrottleFile.cc.

223  {
224  std::unique_ptr<FileSystem> fs(new FileSystem(curr_oss, logger, envP));
225  if (fs->Configure(config_fn)) {
226  XrdSysError(logger, "XrdThrottle").Say("Config", "Unable to load configuration file", config_fn);
227  return nullptr;
228  }
229  // Note the throttle is set up as an OSS.
230  // This will prevent the throttle from being layered on top of the OFS; to keep backward
231  // compatibility with old configurations, we do not cause the server to fail.
232  //
233  // Originally, XrdThrottle was used as an OFS because the loadshed code required the ability
234  // to redirect the client to a different server. This is rarely (never?) used in practice.
235  // By putting the throttle in the OSS, we benefit from the fact the OFS has first run the
236  // authorization code and has made a user name available for fairshare of the throttle.
237  envP->PutInt("XrdOssThrottle", 1);
238  return fs.release();
239 }
void PutInt(const char *varname, long value)
Definition: XrdOucEnv.cc:268
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
XrdOucEnv * envP
Definition: XrdPss.cc:109

References XrdProxy::envP, XrdOucEnv::PutInt(), and XrdSysError::Say().

+ Here is the call graph for this function:

◆ XrdVERSIONINFO()

XrdVERSIONINFO ( XrdOssAddStorageSystem2  ,
throttle   
)