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