![]() |
XRootD
|
#include <XrdStatsFileSystem.hh>
Public Member Functions | |
StatsFileSystem (XrdOss *oss, XrdSysLogger *log, const char *configName, XrdOucEnv *envP) | |
virtual | ~StatsFileSystem () |
int | Chmod (const char *path, mode_t mode, XrdOucEnv *env=0) override |
bool | Config (const char *configfn) |
void | Connect (XrdOucEnv &env) override |
int | Create (const char *tid, const char *path, mode_t mode, XrdOucEnv &env, int opts=0) override |
void | Disc (XrdOucEnv &env) override |
void | EnvInfo (XrdOucEnv *env) override |
uint64_t | Features () override |
int | FSctl (int cmd, int alen, const char *args, char **resp=0) override |
int | Init (XrdSysLogger *lp, const char *cfn) override |
int | Init (XrdSysLogger *lp, const char *cfn, XrdOucEnv *env) override |
int | Lfn2Pfn (const char *Path, char *buff, int blen) override |
const char * | Lfn2Pfn (const char *Path, char *buff, int blen, int &rc) override |
int | Mkdir (const char *path, mode_t mode, int mkpath=0, XrdOucEnv *env=0) override |
XrdOssDF * | newDir (const char *user=0) override |
XrdOssDF * | newFile (const char *user=0) override |
int | Reloc (const char *tident, const char *path, const char *cgName, const char *anchor=0) override |
int | Remdir (const char *path, int Opts=0, XrdOucEnv *env=0) override |
int | Rename (const char *oPath, const char *nPath, XrdOucEnv *oEnvP=0, XrdOucEnv *nEnvP=0) override |
int | Stat (const char *path, struct stat *buff, int opts=0, XrdOucEnv *env=0) override |
int | StatFS (const char *path, char *buff, int &blen, XrdOucEnv *env=0) override |
int | StatLS (XrdOucEnv &env, const char *path, char *buff, int &blen) override |
int | StatPF (const char *path, struct stat *buff) override |
int | StatPF (const char *path, struct stat *buff, int opts) override |
int | Stats (char *buff, int blen) override |
int | StatVS (XrdOssVSInfo *vsP, const char *sname=0, int updt=0) override |
int | StatXA (const char *path, char *buff, int &blen, XrdOucEnv *env=0) override |
int | StatXP (const char *path, unsigned long long &attr, XrdOucEnv *env=0) override |
int | Truncate (const char *path, unsigned long long fsize, XrdOucEnv *env=0) override |
int | Unlink (const char *path, int Opts=0, XrdOucEnv *env=0) override |
![]() | |
XrdOss () | |
Constructor and Destructor. More... | |
virtual | ~XrdOss () |
Friends | |
class | StatsDirectory |
class | StatsFile |
Additional Inherited Members | |
![]() | |
static const int | PF_csVer = 0x00000001 |
verified file checksums present More... | |
static const int | PF_csVun = 0x00000002 |
unverified file checksums present More... | |
static const int | PF_dInfo = 0x00000001 |
static const int | PF_dNums = 0x00000002 |
static const int | PF_dStat = 0x00000008 |
static const int | PF_isLFN = 0x00000004 |
Definition at line 17 of file XrdStatsFileSystem.hh.
StatsFileSystem::StatsFileSystem | ( | XrdOss * | oss, |
XrdSysLogger * | log, | ||
const char * | configName, | ||
XrdOucEnv * | envP | ||
) |
Definition at line 14 of file XrdStatsFileSystem.cc.
References Config(), XrdSysError::Emsg(), XrdProxy::envP, XrdOucEnv::GetPtr(), XrdSysThread::Run(), and XrdSysError::Say().
|
virtual |
Definition at line 39 of file XrdStatsFileSystem.cc.
|
overridevirtual |
Change file mode settings.
path | - Pointer to the path of the file in question. |
mode | - The new file mode setting. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 111 of file XrdStatsFileSystem.cc.
References XrdOss::Chmod().
bool StatsFileSystem::Config | ( | const char * | configfn | ) |
Definition at line 52 of file XrdStatsFileSystem.cc.
References All, Macaroons::Debug, XrdSysError::Emsg(), Macaroons::Error, XrdOucGatherConf::Gather(), XrdOucGatherConf::GetLine(), XrdSysError::getMsgMask(), XrdOucGatherConf::GetToken(), Info, LogMaskToString(), ParseDuration(), XrdSysError::setMsgMask(), XrdOucGatherConf::trim_lines, and Warning.
Referenced by StatsFileSystem().
|
overridevirtual |
Notify storage system that a client has connected.
env | - Reference to environmental information. |
Reimplemented from XrdOss.
Definition at line 117 of file XrdStatsFileSystem.cc.
References XrdOss::Connect().
|
overridevirtual |
Create file.
tid | - Pointer to the trace identifier. |
path | - Pointer to the path of the file to create. |
mode | - The new file mode setting. |
env | - Reference to environmental information. |
opts | - Create options: XRDOSS_mkpath - create dir path if it does not exist. XRDOSS_new - the file must not already exist. oflags<<8 - open flags shifted 8 bits to the left/ |
Implements XrdOss.
Definition at line 122 of file XrdStatsFileSystem.cc.
References XrdOss::Create(), and opts.
|
overridevirtual |
Notify storage system that a client has disconnected.
env | - Reference to environmental information. |
Reimplemented from XrdOss.
Definition at line 128 of file XrdStatsFileSystem.cc.
References XrdOss::Disc().
|
overridevirtual |
Notify storage system of initialization information (deprecated).
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 133 of file XrdStatsFileSystem.cc.
References XrdOss::EnvInfo().
|
overridevirtual |
Return storage system features.
Reimplemented from XrdOss.
Definition at line 138 of file XrdStatsFileSystem.cc.
References XrdOss::Features().
|
overridevirtual |
Execute a special storage system operation.
cmd | - The operation to be performed: XRDOSS_FSCTLFA - Perform proxy file attribute operation |
alen | - Length of data pointed to by args. |
args | - Data sent with request, zero if alen is zero. |
resp | - Where the response is to be set, if any. |
Reimplemented from XrdOss.
Definition at line 143 of file XrdStatsFileSystem.cc.
References XrdOss::FSctl().
|
overridevirtual |
Initialize the storage system V1 (deprecated).
lp | - Pointer to the message logging object. |
cfn | - Pointer to the configuration file. |
Implements XrdOss.
Definition at line 148 of file XrdStatsFileSystem.cc.
Referenced by Init().
|
overridevirtual |
Initialize the storage system V2.
lp | - Pointer to the message logging object. |
cfn | - Pointer to the configuration file. |
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 153 of file XrdStatsFileSystem.cc.
References Init().
|
overridevirtual |
Translate logical name to physical name V1 (deprecated).
Path | - Path in whose information is wanted. |
buff | - Pointer to the buffer to hold the new path. |
blen | - Length of the buffer. |
Reimplemented from XrdOss.
Definition at line 253 of file XrdStatsFileSystem.cc.
References XrdOss::Lfn2Pfn(), and Path.
|
overridevirtual |
Translate logical name to physical name V2.
Path | - Path in whose information is wanted. |
buff | - Pointer to the buffer to hold the new path. |
blen | - Length of the buffer. |
rc | - Place where failure return code is to be returned: -errno or -osserr (see XrdOssError.hh). |
Reimplemented from XrdOss.
Definition at line 258 of file XrdStatsFileSystem.cc.
References XrdOss::Lfn2Pfn(), and Path.
|
overridevirtual |
Create a directory.
path | - Pointer to the path of the directory to be created. |
mode | - The directory mode setting. |
mkpath | - When true the path is created if it does not exist. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 158 of file XrdStatsFileSystem.cc.
References XrdOss::Mkdir().
|
overridevirtual |
Obtain a new director object to be used for future directory requests.
tident | - The trace identifier. |
Implements XrdOss.
Definition at line 97 of file XrdStatsFileSystem.cc.
References XrdOss::newDir(), and StatsDirectory.
|
overridevirtual |
Obtain a new file object to be used for a future file requests.
tident | - The trace identifier. |
Implements XrdOss.
Definition at line 104 of file XrdStatsFileSystem.cc.
References XrdOss::newFile(), and StatsFile.
|
overridevirtual |
Relocate/Copy the file at ‘path’ to a new location.
tident | - -> trace identifier for this operation. |
path | - -> fully qualified name of the file to relocate. |
cgName | - -> target space name[:path] |
anchor | - Processing directions (see XrdOssReloc.cc example). |
Reimplemented from XrdOss.
Definition at line 164 of file XrdStatsFileSystem.cc.
References XrdOss::Reloc(), and tident.
|
overridevirtual |
Remove a directory.
path | - Pointer to the path of the directory to be removed. |
Opts | - The processing options: XRDOSS_Online - only remove online copy XRDOSS_isPFN - path is already translated. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 170 of file XrdStatsFileSystem.cc.
References XrdMpx::Opts, and XrdOss::Remdir().
|
overridevirtual |
Rename a file or directory.
oPath | - Pointer to the path to be renamed. |
nPath | - Pointer to the path oPath is to have. |
oEnvP | - Environmental information for oPath. |
nEnvP | - Environmental information for nPath. |
Implements XrdOss.
Definition at line 175 of file XrdStatsFileSystem.cc.
References XrdOss::Rename().
|
overridevirtual |
Return state information on a file or directory.
path | - Pointer to the path in question. |
buff | - Pointer to the structure where info it to be returned. |
opts | - Options: XRDOSS_preop - this is a stat prior to open. XRDOSS_resonly - only look for resident files. XRDOSS_updtatm - update file access time. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 182 of file XrdStatsFileSystem.cc.
References opts, and XrdOss::Stat().
|
overridevirtual |
Return filesystem physical space information associated with a path.
path | - Path in the partition in question. |
buff | - Pointer to the buffer to hold the information. |
blen | - Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf(). |
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 194 of file XrdStatsFileSystem.cc.
References XrdOss::StatFS().
|
overridevirtual |
Return filesystem physical space information associated with a space name.
env | - Ref to environmental information. If the environment has the key oss.cgroup defined, the associated value is used as the space name and the path is ignored. |
path | - Path in the name space in question. The space name associated with gthe path is used unless overridden. |
buff | - Pointer to the buffer to hold the information. |
blen | - Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf(). |
Reimplemented from XrdOss.
Definition at line 201 of file XrdStatsFileSystem.cc.
References XrdOss::StatLS().
|
overridevirtual |
Reimplemented from XrdOss.
Definition at line 214 of file XrdStatsFileSystem.cc.
References XrdOss::StatPF().
|
overridevirtual |
Reimplemented from XrdOss.
Definition at line 208 of file XrdStatsFileSystem.cc.
References opts, and XrdOss::StatPF().
|
overridevirtual |
Return statistics.
buff | - Pointer to the buffer to hold statistics. |
blen | - Length of the buffer. |
Reimplemented from XrdOss.
Definition at line 189 of file XrdStatsFileSystem.cc.
References XrdOss::Stats().
|
overridevirtual |
Return space information for a space name.
vsP | - Pointer to the XrdOssVSInfo object to hold results. It should be fully initialized (i.e. a new copy). |
sname | - Pointer to the space name. If the name starts with a plus (e.g. "+public"), partition information is returned, should it exist. If nil, space information for all spaces is returned. See, XrdOssVS.hh for more info. |
updt | - When true, a space update occurrs prior to a query. |
Reimplemented from XrdOss.
Definition at line 220 of file XrdStatsFileSystem.cc.
References XrdOss::StatVS().
|
overridevirtual |
Return logical extended attributes associated with a path.
path | - Path in whose information is wanted. |
buff | - Pointer to the buffer to hold the information. |
blen | - Length of the buffer. This is updated with the actual number of bytes placed in the buffer as in snprintf(). |
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 226 of file XrdStatsFileSystem.cc.
References XrdOss::StatXA().
|
overridevirtual |
Return export attributes associated with a path.
path | - Path in whose information is wanted. |
attr | - Reference to where the inforamation is to be stored. |
envP | - Pointer to environmental information. |
Reimplemented from XrdOss.
Definition at line 233 of file XrdStatsFileSystem.cc.
References XrdOss::StatXP().
|
overridevirtual |
Truncate a file.
path | - Pointer to the path of the file to be truncated. |
fsize | - The size that the file is to have. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 240 of file XrdStatsFileSystem.cc.
References XrdOss::Truncate().
|
overridevirtual |
Remove a file.
path | - Pointer to the path of the file to be removed. |
Opts | - Options: XRDOSS_isMIG - this is a migratable path. XRDOSS_isPFN - do not apply name2name to path. XRDOSS_Online - remove only the online copy. |
envP | - Pointer to environmental information. |
Implements XrdOss.
Definition at line 247 of file XrdStatsFileSystem.cc.
References XrdMpx::Opts, and XrdOss::Unlink().
|
friend |
Definition at line 19 of file XrdStatsFileSystem.hh.
Referenced by newDir().
|
friend |
Definition at line 18 of file XrdStatsFileSystem.hh.
Referenced by newFile().