Loading...
Searching...
No Matches
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

XrdOss * | XrdOssAddStorageSystem2 (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 228 of file XrdOssThrottleFile.cc.

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

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

Here is the call graph for this function:

## XrdVERSIONINFO()

XrdVERSIONINFO | ( | XrdOssAddStorageSystem2 | ,
|  | throttle | )

References XrdOssAddStorageSystem2().

Here is the call graph for this function: