XRootD
Loading...
Searching...
No Matches
XrdThrottleFileSystem.cc
Go to the documentation of this file.
1
2#include "XrdOfs/XrdOfs.hh"
3
5
6#include "XrdVersion.hh"
7
8using namespace XrdThrottle;
9
10/*
11 * A whole ton of pass-through functions which chain to the underlying SFS.
12 */
13
16 int monid)
17{
18 return m_sfs_ptr->newDir(user, monid);
19}
20
23 int monid)
24{
25 XrdSfsFile * chain_file = m_sfs_ptr->newFile(user, monid);
26 if (chain_file)
27 {
28 unique_sfs_ptr chain_file_ptr(chain_file);
29 // We should really be giving out shared_ptrs to m_throttle, but alas, no boost.
30#if __cplusplus >= 201103L
31 return static_cast<XrdSfsFile*>(new File(user, std::move(chain_file_ptr), m_throttle, m_eroute));
32#else
33 return static_cast<XrdSfsFile*>(new File(user, chain_file_ptr, m_throttle, m_eroute));
34#endif
35 }
36 return NULL;
37}
38
39int
41 const char *csName,
42 const char *path,
43 XrdOucErrInfo &eInfo,
44 const XrdSecEntity *client,
45 const char *opaque)
46{
47 return m_sfs_ptr->chksum(Func, csName, path, eInfo, client, opaque);
48}
49
50int
51FileSystem::chmod(const char *Name,
53 XrdOucErrInfo &out_error,
54 const XrdSecEntity *client,
55 const char *opaque)
56{
57 return m_sfs_ptr->chmod(Name, Mode, out_error, client, opaque);
58}
59
60void
62{
63 m_sfs_ptr->Connect(client);
64}
65
66void
68{
69 m_sfs_ptr->Disc(client);
70}
71
72void
74{
75 m_sfs_ptr->EnvInfo(envP);
76}
77
78int
79FileSystem::exists(const char *fileName,
80 XrdSfsFileExistence &exists_flag,
81 XrdOucErrInfo &out_error,
82 const XrdSecEntity *client,
83 const char *opaque)
84{
85 return m_sfs_ptr->exists(fileName, exists_flag, out_error, client, opaque);
86}
87
88int
90 XrdOucErrInfo &eInfo,
91 const XrdSecEntity *client)
92{
93 return m_sfs_ptr->FAttr(faReq, eInfo, client);
94}
95
96int
97FileSystem::fsctl(const int cmd,
98 const char *args,
99 XrdOucErrInfo &out_error,
100 const XrdSecEntity *client)
101{
102 return m_sfs_ptr->fsctl(cmd, args, out_error, client);
103}
104
105int
107{
108 return m_sfs_ptr->getChkPSize();
109}
110
111int
113 int blen)
114{
115 return m_sfs_ptr->getStats(buff, blen);
116}
117
118const char *
120{
121 return XrdVERSION;
122}
123
124int
126 XrdSfsGPFile &gpReq,
127 XrdOucErrInfo &eInfo,
128 const XrdSecEntity *client)
129{
130 return m_sfs_ptr->gpFile(gpAct, gpReq, eInfo, client);
131}
132
133int
134FileSystem::mkdir(const char *dirName,
136 XrdOucErrInfo &out_error,
137 const XrdSecEntity *client,
138 const char *opaque)
139{
140 return m_sfs_ptr->mkdir(dirName, Mode, out_error, client, opaque);
141}
142
143int
145 XrdOucErrInfo &out_error,
146 const XrdSecEntity *client)
147{
148 return m_sfs_ptr->prepare(pargs, out_error, client);
149}
150
151int
152FileSystem::rem(const char *path,
153 XrdOucErrInfo &out_error,
154 const XrdSecEntity *client,
155 const char *info)
156{
157 return m_sfs_ptr->rem(path, out_error, client, info);
158}
159
160int
161FileSystem::remdir(const char *dirName,
162 XrdOucErrInfo &out_error,
163 const XrdSecEntity *client,
164 const char *info)
165{
166 return m_sfs_ptr->remdir(dirName, out_error, client, info);
167}
168
169int
170FileSystem::rename(const char *oldFileName,
171 const char *newFileName,
172 XrdOucErrInfo &out_error,
173 const XrdSecEntity *client,
174 const char *infoO,
175 const char *infoN)
176{
177 return m_sfs_ptr->rename(oldFileName, newFileName, out_error, client, infoO, infoN);
178}
179
180int
181FileSystem::stat(const char *Name,
182 struct stat *buf,
183 XrdOucErrInfo &out_error,
184 const XrdSecEntity *client,
185 const char *opaque)
186{
187 return m_sfs_ptr->stat(Name, buf, out_error, client, opaque);
188}
189
190int
191FileSystem::stat(const char *Name,
192 mode_t &mode,
193 XrdOucErrInfo &out_error,
194 const XrdSecEntity *client,
195 const char *opaque)
196{
197 return m_sfs_ptr->stat(Name, mode, out_error, client, opaque);
198}
199
200int
201FileSystem::truncate(const char *Name,
202 XrdSfsFileOffset fileOffset,
203 XrdOucErrInfo &out_error,
204 const XrdSecEntity *client,
205 const char *opaque)
206{
207 return m_sfs_ptr->truncate(Name, fileOffset, out_error, client, opaque);
208}
209
int Mode
int XrdSfsMode
XrdSfsFileExistence
long long XrdSfsFileOffset
< Prepare parameters
virtual int stat(struct stat *buf)=0
virtual void Connect(const XrdSecEntity *client=0) override
virtual XrdSfsFile * newFile(char *user=0, int monid=0) override
virtual int gpFile(gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0) override
virtual int rem(const char *path, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0) override
virtual int getStats(char *buff, int blen) override
virtual void EnvInfo(XrdOucEnv *envP) override
virtual int fsctl(const int cmd, const char *args, XrdOucErrInfo &out_error, const XrdSecEntity *client) override
virtual int mkdir(const char *dirName, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
virtual int truncate(const char *Name, XrdSfsFileOffset fileOffset, XrdOucErrInfo &out_error, const XrdSecEntity *client=0, const char *opaque=0) override
virtual void Disc(const XrdSecEntity *client=0) override
virtual const char * getVersion() override
virtual int exists(const char *fileName, XrdSfsFileExistence &exists_flag, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
virtual XrdSfsDirectory * newDir(char *user=0, int monid=0) override
virtual int rename(const char *oldFileName, const char *newFileName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *infoO=0, const char *infoN=0) override
virtual int chmod(const char *Name, XrdSfsMode Mode, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
virtual int prepare(XrdSfsPrep &pargs, XrdOucErrInfo &out_error, const XrdSecEntity *client=0) override
virtual int remdir(const char *dirName, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *info=0) override
virtual int getChkPSize() override
virtual int stat(const char *Name, struct stat *buf, XrdOucErrInfo &out_error, const XrdSecEntity *client, const char *opaque=0) override
virtual int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0) override
virtual int FAttr(XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0) override
std::auto_ptr< XrdSfsFile > unique_sfs_ptr