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