XRootD
Loading...
Searching...
No Matches
XrdSfsInterface.hh
Go to the documentation of this file.
1#ifndef __SFS_INTERFACE_H__
2#define __SFS_INTERFACE_H__
3/******************************************************************************/
4/* */
5/* X r d S f s I n t e r f a c e . h h */
6/* */
7/* (c) 2018 by the Board of Trustees of the Leland Stanford, Jr., University */
8/* Produced by Andrew Hanushevsky for Stanford University under contract */
9/* DE-AC02-76-SFO0515 with the Department of Energy */
10/* */
11/* This file is part of the XRootD software suite. */
12/* */
13/* XRootD is free software: you can redistribute it and/or modify it under */
14/* the terms of the GNU Lesser General Public License as published by the */
15/* Free Software Foundation, either version 3 of the License, or (at your */
16/* option) any later version. */
17/* */
18/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21/* License for more details. */
22/* */
23/* You should have received a copy of the GNU Lesser General Public License */
24/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26/* */
27/* The copyright holder's institutional names and contributor's names may not */
28/* be used to endorse or promote products derived from this software without */
29/* specific prior written permission of the institution or contributor. */
30/******************************************************************************/
31
32#include <cstring> // For strlcpy()
33#include <cerrno>
34#include <cstdint>
35#include <sys/types.h>
36#include <sys/stat.h>
37
39#include "XrdOuc/XrdOucIOVec.hh"
40#include "XrdOuc/XrdOucSFVec.hh"
41
43
45
46/******************************************************************************/
47/* O p e n M o d e s */
48/******************************************************************************/
49
50#define SFS_O_RDONLY 0 // open read/only
51#define SFS_O_WRONLY 1 // open write/only
52#define SFS_O_RDWR 2 // open read/write
53#define SFS_O_CREAT 0x00000100 // used for file creation
54#define SFS_O_TRUNC 0x00000200 // used for file truncation
55#define SFS_O_MULTIW 0x00000400 // used for multi-write locations
56#define SFS_O_NOTPC 0x00000800 // used to suppress TPC opens
57#define SFS_O_DIRLIST 0x00010000 // used for locate only
58#define SFS_O_POSC 0x00100000 // persist on successful close
59#define SFS_O_FORCE 0x00200000 // used for locate only
60#define SFS_O_HNAME 0x00400000 // used for locate only
61#define SFS_O_LOCAL 0x00800000 // used for locate only (local cmd)
62#define SFS_O_NOWAIT 0x01000000 // do not impose operational delays
63#define SFS_O_RAWIO 0x02000000 // allow client-side decompression
64#define SFS_O_RESET 0x04000000 // Reset any cached information
65#define SFS_O_REPLICA 0x08000000 // Open for replication
66#define SFS_O_SEQIO 0x10000000 // Open for sequential I/O
67
68// The following flag may be set in the access mode arg for open() & mkdir()
69// Note that on some systems mode_t is 16-bits so we use a careful value!
70//
71#define SFS_O_MKPTH 0x00004000 // Make directory path if missing
72
73// The following options are here to provide a uniform clustering interface.
74// They may be passed through open/locate/stat, as applicable.
75//
76#define SFS_O_LOCATE 0x10000000 // This request generated by locate()
77#define SFS_O_STAT 0x20000000 // This request generated by stat()
78#define SFS_O_META 0x40000000 // This request generated by metaop
79
80/******************************************************************************/
81/* D e f i n e s */
82/******************************************************************************/
83
84// Common fctl command values (0 to 255)
85//
86#define SFS_FCTL_GETFD 1 // Return file descriptor if possible
87#define SFS_FCTL_STATV 2 // Return visa information
88#define SFS_FCTL_SPEC1 3 // Return implementation defined information
89
90#define SFS_SFIO_FDVAL 0x80000000 // Use SendData() method GETFD response value
91
92// Common fsctl command values (0 to 255)
93//
94#define SFS_FSCTL_CMD 255
95
96#define SFS_FSCTL_LOCATE 1 // Locate a file
97#define SFS_FSCTL_STATFS 2 // Return FS data
98#define SFS_FSCTL_STATLS 3 // Return LS data
99#define SFS_FSCTL_STATXA 4 // Return XA data
100#define SFS_FSCTL_STATCC 5 // Return Cluster Config status
101#define SFS_FSCTL_PLUGIN 8 // Return Implementation Dependent Data
102#define SFS_FSCTL_PLUGIO 16 // Return Implementation Dependent Data
103#define SFS_FSCTL_PLUGXC 32 // Perform cache oriented operation
104
105// Return values for integer & XrdSfsXferSize returning XrdSfs methods
106//
107#define SFS_STALL 1 // Return value -> Seconds to stall client
108#define SFS_OK 0 // ErrInfo code -> All is well
109#define SFS_ERROR -1 // ErrInfo code -> Error occurred
110#define SFS_REDIRECT -256 // ErrInfo code -> Port number to redirect to
111#define SFS_STARTED -512 // ErrInfo code -> Estimated seconds to completion
112#define SFS_DATA -1024 // ErrInfo code -> Length of data
113#define SFS_DATAVEC -2048 // ErrInfo code -> Num iovec elements in msgbuff
114
115// The following macros are used for dealing with special local paths
116//
117#define SFS_LCLPRFX "/=/"
118#define SFS_LCLPLEN 3
119#define SFS_LCLPATH(x) !strncmp(x, SFS_LCLPRFX, SFS_LCLPLEN)
120#define SFS_LCLPRFY "/="
121#define SFS_LCLROOT(x) !strncmp(x, SFS_LCLPRFX, SFS_LCLPLEN-1) \
122 && (*(x+SFS_LCLPLEN-1) == '/' || *(x+SFS_LCLPLEN-1) == 0)
123
124/******************************************************************************/
125/* S t r u c t u r e s & T y p e d e f s */
126/******************************************************************************/
127
128typedef long long XrdSfsFileOffset;
130typedef int XrdSfsMode;
131typedef int XrdSfsXferSize;
132
141//------------------------------------------------
142
143#define Prep_PRTY0 0
144#define Prep_PRTY1 1
145#define Prep_PRTY2 2
146#define Prep_PRTY3 3
147#define Prep_PMASK 3
148#define Prep_SENDAOK 4
149#define Prep_SENDERR 8
150#define Prep_SENDACK 12
151#define Prep_WMODE 16
152#define Prep_STAGE 32
153#define Prep_COLOC 64
154#define Prep_FRESH 128
155#define Prep_CANCEL 256
156#define Prep_QUERY 512
157#define Prep_EVICT 1024
158
159class XrdOucTList;
160
162{
163 const char *Arg1;
166 union{
167 const char *Arg2;
168 const char **ArgP;
169 };
170};
171
180
181/******************************************************************************/
182/* F o r w a r d D e c l a r a t i o n s */
183/******************************************************************************/
184
185class XrdOucEnv;
186class XrdSecEntity;
187struct XrdSfsFACtl;
188
189/******************************************************************************/
190/* O b j e c t W r a p p i n g G u i d e */
191/******************************************************************************/
192
193/* The XrdSfsDirectory and XrdSfsFile objects can be wrapped. Wraping can be
194 used to add functionality. The process is common and pretty muche rote.
195 There is only one caveat: all wrappers must use the same XrdOucErrInfo
196 object. This is because the ErrInfo object contains client parameters that
197 are used to control how things are done to be backward compatible. Newer
198 client can then use more efficient internal processing. The SFS provides
199 two ways to make sure the same ErrInfo object is used by all objects in
200 the wrapped chain. Forward propagation (the one typically used) and
201 backward propagation (used in certain unusual cases). In forward mode,
202 the ErrInfo object of the last object in the chain is propagated to the
203 front of the chain. In backward mode the reverse happens. Let's assume
204 the following scenarion. Object-A wraps object-B (the object here can be
205 directory or file object). In forward mode weneed to create objects in
206 reverse order (bottom to top) which is typically what you would do anyway
207 as you need to capture the pinter to the object your wrapping. So, using
208 newFile() as an example where sfsP points to the Interface being wrapped:
209
210 XrdSfsFile *newFile(const char *user, int MonID)
211 {
212 XrdSfsFile *wrapped_file = sfsP->newFile(user, MonID);
213 if (!wrapped_file) return 0;
214 return new mySfsFile(wrapped_file,...);
215 }
216 class mySfsFile : public XrdSfsFile
217 {public:
218 mySfsFile(XrdSfsFile *wrapped_file,...) : XrdSfsFile(*wrapped_file)
219 {....}
220 ....
221 };
222
223 Notice we are allocating the wrapped file ahead of the wrapper so that
224 the wrapper can use the ErrInfo object of the wrapped file.
225
226 In backward mode we want to use the ErrInfo object of the front-most
227 wrapper for all wrappers after it. This mechanism is far more complicated
228 due to error handling requirements. However, it's useful when a wrapped
229 object is not necessarily instantiated to accomplish the needs of the
230 wrapper. An example of this is the newFile and newDir implementations for
231 XrdSsi where wrapped object creation is subject to the resource name.
232*/
233
234/******************************************************************************/
235/* X r d S f s D i r e c t o r y */
236/******************************************************************************/
237
238//------------------------------------------------------------------------------
241//------------------------------------------------------------------------------
242
244{
245public:
246
247//-----------------------------------------------------------------------------
250//-----------------------------------------------------------------------------
251
253
254//-----------------------------------------------------------------------------
262//-----------------------------------------------------------------------------
263
264virtual int open(const char *path,
265 const XrdSecEntity *client = 0,
266 const char *opaque = 0) = 0;
267
268//-----------------------------------------------------------------------------
276//-----------------------------------------------------------------------------
277
278virtual const char *nextEntry() = 0;
279
280//-----------------------------------------------------------------------------
284//-----------------------------------------------------------------------------
285
286virtual int close() = 0;
287
288//-----------------------------------------------------------------------------
292//-----------------------------------------------------------------------------
293
294virtual const char *FName() = 0;
295
296//-----------------------------------------------------------------------------
305//-----------------------------------------------------------------------------
306
307virtual int autoStat(struct stat *buf);
308
309//-----------------------------------------------------------------------------
318//-----------------------------------------------------------------------------
319
320 XrdSfsDirectory(const char *user=0, int MonID=0)
321 : error(*(new XrdOucErrInfo(user, MonID)))
322 {lclEI = &error;}
323
324//-----------------------------------------------------------------------------
330//-----------------------------------------------------------------------------
331
333 : error(wrapD.error), lclEI(0) {}
334
335//-----------------------------------------------------------------------------
340//-----------------------------------------------------------------------------
341
343 : error(eInfo), lclEI(0) {}
344
345//-----------------------------------------------------------------------------
347//-----------------------------------------------------------------------------
348
349virtual ~XrdSfsDirectory() {if (lclEI) delete lclEI;}
350
351private:
352XrdOucErrInfo* lclEI;
353
354}; // class XrdSfsDirectory
355
356/******************************************************************************/
357/* X r d S f s F i l e */
358/******************************************************************************/
359
360//------------------------------------------------------------------------------
363//------------------------------------------------------------------------------
364
365class XrdSfsAio;
366class XrdSfsDio;
367class XrdSfsXio;
368
370{
371public:
372
373//-----------------------------------------------------------------------------
376//-----------------------------------------------------------------------------
377
379
380//-----------------------------------------------------------------------------
402//-----------------------------------------------------------------------------
403
404virtual int open(const char *fileName,
405 XrdSfsFileOpenMode openMode,
406 mode_t createMode,
407 const XrdSecEntity *client = 0,
408 const char *opaque = 0) = 0;
409
410//-----------------------------------------------------------------------------
431//-----------------------------------------------------------------------------
432
440
441virtual int checkpoint(cpAct act, struct iov *range=0, int n=0);
442
443//-----------------------------------------------------------------------------
447//-----------------------------------------------------------------------------
448
449virtual int close() = 0;
450
451//-----------------------------------------------------------------------------
468//-----------------------------------------------------------------------------
469
470virtual int fctl(const int cmd,
471 const char *args,
472 XrdOucErrInfo &eInfo) = 0;
473
474//-----------------------------------------------------------------------------
487//-----------------------------------------------------------------------------
488
489virtual int fctl(const int cmd,
490 int alen,
491 const char *args,
492 const XrdSecEntity *client = 0);
493
494//-----------------------------------------------------------------------------
498//-----------------------------------------------------------------------------
499
500virtual const char *FName() = 0;
501
502//-----------------------------------------------------------------------------
509//-----------------------------------------------------------------------------
510
511virtual int getMmap(void **Addr, off_t &Size) = 0;
512
513//-----------------------------------------------------------------------------
515//-----------------------------------------------------------------------------
516
517static const uint64_t
518Verify = 0x8000000000000000ULL;
519
520//-----------------------------------------------------------------------------
539//-----------------------------------------------------------------------------
540
542 char *buffer,
543 XrdSfsXferSize rdlen,
544 uint32_t *csvec,
545 uint64_t opts=0);
546
547//-----------------------------------------------------------------------------
555//-----------------------------------------------------------------------------
556
557virtual int pgRead(XrdSfsAio *aioparm, uint64_t opts=0);
558
559//-----------------------------------------------------------------------------
579//-----------------------------------------------------------------------------
580
582 char *buffer,
583 XrdSfsXferSize wrlen,
584 uint32_t *csvec,
585 uint64_t opts=0);
586
587//-----------------------------------------------------------------------------
595//-----------------------------------------------------------------------------
596
597virtual int pgWrite(XrdSfsAio *aioparm, uint64_t opts=0);
598
599//-----------------------------------------------------------------------------
607//-----------------------------------------------------------------------------
608
610 XrdSfsXferSize size) = 0;
611
612//-----------------------------------------------------------------------------
621//-----------------------------------------------------------------------------
622
624 char *buffer,
625 XrdSfsXferSize size) = 0;
626
627//-----------------------------------------------------------------------------
634//-----------------------------------------------------------------------------
635
636virtual int read(XrdSfsAio *aioparm) = 0;
637
638//-----------------------------------------------------------------------------
648//-----------------------------------------------------------------------------
649
650virtual XrdSfsXferSize readv(XrdOucIOVec *readV,
651 int rdvCnt);
652
653//-----------------------------------------------------------------------------
663//-----------------------------------------------------------------------------
664
665virtual int SendData(XrdSfsDio *sfDio,
666 XrdSfsFileOffset offset,
667 XrdSfsXferSize size);
668
669//-----------------------------------------------------------------------------
678//-----------------------------------------------------------------------------
679
681 const char *buffer,
682 XrdSfsXferSize size) = 0;
683
684//-----------------------------------------------------------------------------
691//-----------------------------------------------------------------------------
692
693virtual int write(XrdSfsAio *aioparm) = 0;
694
695//-----------------------------------------------------------------------------
705//-----------------------------------------------------------------------------
706
707virtual XrdSfsXferSize writev(XrdOucIOVec *writeV,
708 int wdvCnt);
709
710//-----------------------------------------------------------------------------
717//-----------------------------------------------------------------------------
718
719virtual int stat(struct stat *buf) = 0;
720
721//-----------------------------------------------------------------------------
725//-----------------------------------------------------------------------------
726
727virtual int sync() = 0;
728
729//-----------------------------------------------------------------------------
734//-----------------------------------------------------------------------------
735
736virtual int sync(XrdSfsAio *aiop) = 0;
737
738//-----------------------------------------------------------------------------
744//-----------------------------------------------------------------------------
745
746virtual int truncate(XrdSfsFileOffset fsize) = 0;
747
748//-----------------------------------------------------------------------------
756//-----------------------------------------------------------------------------
757
758virtual int getCXinfo(char cxtype[4], int &cxrsz) = 0;
759
760//-----------------------------------------------------------------------------
764//-----------------------------------------------------------------------------
765
766virtual void setXio(XrdSfsXio *xioP) { (void)xioP; }
767
768//-----------------------------------------------------------------------------
777//-----------------------------------------------------------------------------
778
779 XrdSfsFile(const char *user=0, int MonID=0)
780 : error(*(new XrdOucErrInfo(user, MonID)))
781 {lclEI = &error; pgwrEOF = 0;}
782
783//-----------------------------------------------------------------------------
789//-----------------------------------------------------------------------------
790
792 : error(wrapF.error), lclEI(0), pgwrEOF(0) {}
793
794//-----------------------------------------------------------------------------
799//-----------------------------------------------------------------------------
800
802 : error(eInfo), lclEI(0), pgwrEOF(0) {}
803
804//-----------------------------------------------------------------------------
806//-----------------------------------------------------------------------------
807
808virtual ~XrdSfsFile() {if (lclEI) delete lclEI;}
809
810private:
811XrdOucErrInfo* lclEI;
812XrdSfsFileOffset pgwrEOF;
813}; // class XrdSfsFile
814
815/******************************************************************************/
816/* X r d S f s F i l e S y s t e m */
817/******************************************************************************/
818
819//-----------------------------------------------------------------------------
843//-----------------------------------------------------------------------------
844
846{
847public:
848
849//-----------------------------------------------------------------------------
859//-----------------------------------------------------------------------------
860
861virtual XrdSfsDirectory *newDir(char *user=0, int MonID=0) = 0;
862
863//-----------------------------------------------------------------------------
874//-----------------------------------------------------------------------------
875
876virtual XrdSfsDirectory *newDir(XrdOucErrInfo &eInfo) {(void)eInfo; return 0;}
877
878//-----------------------------------------------------------------------------
888//-----------------------------------------------------------------------------
889
890virtual XrdSfsFile *newFile(char *user=0, int MonID=0) = 0;
891
892//-----------------------------------------------------------------------------
903//-----------------------------------------------------------------------------
904
905virtual XrdSfsFile *newFile(XrdOucErrInfo &eInfo) {(void)eInfo; return 0;}
906
907//-----------------------------------------------------------------------------
926//-----------------------------------------------------------------------------
927
929
930virtual int chksum( csFunc Func,
931 const char *csName,
932 const char *path,
933 XrdOucErrInfo &eInfo,
934 const XrdSecEntity *client = 0,
935 const char *opaque = 0);
936
937//-----------------------------------------------------------------------------
947//-----------------------------------------------------------------------------
948
949virtual int chmod(const char *path,
950 XrdSfsMode mode,
951 XrdOucErrInfo &eInfo,
952 const XrdSecEntity *client = 0,
953 const char *opaque = 0) = 0;
954
955//-----------------------------------------------------------------------------
959//-----------------------------------------------------------------------------
960
961virtual void Connect(const XrdSecEntity *client = 0)
962{
963 (void)client;
964}
965
966//-----------------------------------------------------------------------------
970//-----------------------------------------------------------------------------
971
972virtual void Disc(const XrdSecEntity *client = 0) {(void)client;}
973
974//-----------------------------------------------------------------------------
979//-----------------------------------------------------------------------------
980
981virtual void EnvInfo(XrdOucEnv *envP) {(void)envP;}
982
983//-----------------------------------------------------------------------------
999//-----------------------------------------------------------------------------
1000
1001virtual int exists(const char *path,
1002 XrdSfsFileExistence &eFlag,
1003 XrdOucErrInfo &eInfo,
1004 const XrdSecEntity *client = 0,
1005 const char *opaque = 0) = 0;
1006
1007//-----------------------------------------------------------------------------
1021//-----------------------------------------------------------------------------
1022
1023virtual int FAttr( XrdSfsFACtl *faReq,
1024 XrdOucErrInfo &eInfo,
1025 const XrdSecEntity *client = 0);
1026
1027//-----------------------------------------------------------------------------
1032//-----------------------------------------------------------------------------
1033
1034 uint64_t Features() {return FeatureSet;}
1035
1036//-----------------------------------------------------------------------------
1052//-----------------------------------------------------------------------------
1053
1054virtual int FSctl(const int cmd,
1055 XrdSfsFSctl &args,
1056 XrdOucErrInfo &eInfo,
1057 const XrdSecEntity *client = 0);
1058
1059//-----------------------------------------------------------------------------
1087//-----------------------------------------------------------------------------
1088
1089virtual int fsctl(const int cmd,
1090 const char *args,
1091 XrdOucErrInfo &eInfo,
1092 const XrdSecEntity *client = 0) = 0;
1093
1094//-----------------------------------------------------------------------------
1098//-----------------------------------------------------------------------------
1099
1100virtual int getChkPSize() {return 0;}
1101
1102//-----------------------------------------------------------------------------
1112//-----------------------------------------------------------------------------
1113
1114virtual int getStats(char *buff, int blen) = 0;
1115
1116//-----------------------------------------------------------------------------
1120//-----------------------------------------------------------------------------
1121
1122virtual const char *getVersion() = 0;
1123
1124//-----------------------------------------------------------------------------
1135//-----------------------------------------------------------------------------
1136
1140 };
1141
1142virtual int gpFile( gpfFunc &gpAct,
1143 XrdSfsGPFile &gpReq,
1144 XrdOucErrInfo &eInfo,
1145 const XrdSecEntity *client = 0);
1146
1147//-----------------------------------------------------------------------------
1157//-----------------------------------------------------------------------------
1158
1159virtual int mkdir(const char *path,
1160 XrdSfsMode mode,
1161 XrdOucErrInfo &eInfo,
1162 const XrdSecEntity *client = 0,
1163 const char *opaque = 0) = 0;
1164
1165//-----------------------------------------------------------------------------
1173//-----------------------------------------------------------------------------
1174
1175virtual int prepare( XrdSfsPrep &pargs,
1176 XrdOucErrInfo &eInfo,
1177 const XrdSecEntity *client = 0) = 0;
1178
1179//-----------------------------------------------------------------------------
1188//-----------------------------------------------------------------------------
1189
1190virtual int rem(const char *path,
1191 XrdOucErrInfo &eInfo,
1192 const XrdSecEntity *client = 0,
1193 const char *opaque = 0) = 0;
1194
1195//-----------------------------------------------------------------------------
1204//-----------------------------------------------------------------------------
1205
1206virtual int remdir(const char *path,
1207 XrdOucErrInfo &eInfo,
1208 const XrdSecEntity *client = 0,
1209 const char *opaque = 0) = 0;
1210
1211//-----------------------------------------------------------------------------
1222//-----------------------------------------------------------------------------
1223
1224virtual int rename(const char *oPath,
1225 const char *nPath,
1226 XrdOucErrInfo &eInfo,
1227 const XrdSecEntity *client = 0,
1228 const char *opaqueO = 0,
1229 const char *opaqueN = 0) = 0;
1230
1231//-----------------------------------------------------------------------------
1242//-----------------------------------------------------------------------------
1243
1244virtual int stat(const char *Name,
1245 struct stat *buf,
1246 XrdOucErrInfo &eInfo,
1247 const XrdSecEntity *client = 0,
1248 const char *opaque = 0) = 0;
1249
1250//-----------------------------------------------------------------------------
1262//-----------------------------------------------------------------------------
1263
1264virtual int stat(const char *path,
1265 mode_t &mode,
1266 XrdOucErrInfo &eInfo,
1267 const XrdSecEntity *client = 0,
1268 const char *opaque = 0) = 0;
1269
1270//-----------------------------------------------------------------------------
1280//-----------------------------------------------------------------------------
1281
1282virtual int truncate(const char *path,
1283 XrdSfsFileOffset fsize,
1284 XrdOucErrInfo &eInfo,
1285 const XrdSecEntity *client = 0,
1286 const char *opaque = 0) = 0;
1287
1288//-----------------------------------------------------------------------------
1290//-----------------------------------------------------------------------------
1291
1294
1295protected:
1296
1297uint64_t FeatureSet;
1298};
1299
1300/******************************************************************************/
1301/* F i l e S y s t e m I n s t a n t i a t o r */
1302/******************************************************************************/
1303
1304//-----------------------------------------------------------------------------
1326
1327typedef XrdSfsFileSystem *(*XrdSfsFileSystem2_t)(XrdSfsFileSystem *nativeFS,
1329 const char *configFn,
1330 XrdOucEnv *envP);
1331
1332//-----------------------------------------------------------------------------
1343
1344typedef XrdSfsFileSystem *(*XrdSfsFileSystem_t) (XrdSfsFileSystem *nativeFS,
1346 const char *configFn);
1347
1348//------------------------------------------------------------------------------
1360//------------------------------------------------------------------------------
1361#endif
static XrdSysLogger Logger
#define writev(a, b, c)
Definition XrdPosix.hh:112
#define readv(a, b, c)
Definition XrdPosix.hh:79
#define stat(a, b)
Definition XrdPosix.hh:96
struct myOpts opts
int XrdSfsMode
const char * Arg1
PLUGINO, PLUGION, PLUGXC.
const char * Arg2
PLUGIN opaque string.
int Arg2Len
Length or -count of args in extension.
const char ** ArgP
PLUGXC argument list extension.
char * notify
Notification path or 0.
XrdOucTList * paths
List of paths.
XrdOucTList * oinfo
1-to-1 correspondence of opaque info
XrdSfsFileExistence
@ XrdSfsFileExistIsOther
@ XrdSfsFileExistIsFile
@ XrdSfsFileExistNo
@ XrdSfsFileExistIsOffline
@ XrdSfsFileExistIsDirectory
char * reqid
Request ID.
int XrdSfsFileOpenMode
int Arg1Len
Length.
long long XrdSfsFileOffset
int opts
Prep_xxx.
int XrdSfsXferSize
< Prepare parameters
< SFS_FSCTL_PLUGIN/PLUGIO/PLUGXC parms
virtual int autoStat(struct stat *buf)
XrdSfsDirectory(XrdOucErrInfo &eInfo)
XrdSfsDirectory(const char *user=0, int MonID=0)
XrdSfsDirectory(XrdSfsDirectory &wrapD)
virtual ~XrdSfsDirectory()
Destructor.
virtual int open(const char *path, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual const char * FName()=0
XrdOucErrInfo & error
virtual const char * nextEntry()=0
virtual int close()=0
virtual void Connect(const XrdSecEntity *client=0)
XrdSfsFileSystem()
Constructor and Destructor.
virtual int chmod(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual void EnvInfo(XrdOucEnv *envP)
virtual int stat(const char *path, mode_t &mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual void Disc(const XrdSecEntity *client=0)
virtual int getStats(char *buff, int blen)=0
virtual int fsctl(const int cmd, const char *args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0
virtual int rename(const char *oPath, const char *nPath, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaqueO=0, const char *opaqueN=0)=0
virtual int mkdir(const char *path, XrdSfsMode mode, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual const char * getVersion()=0
virtual int FSctl(const int cmd, XrdSfsFSctl &args, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
virtual XrdSfsFile * newFile(char *user=0, int MonID=0)=0
virtual int truncate(const char *path, XrdSfsFileOffset fsize, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual int chksum(csFunc Func, const char *csName, const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)
virtual int remdir(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual int getChkPSize()
uint64_t FeatureSet
Adjust features at initialization.
virtual int exists(const char *path, XrdSfsFileExistence &eFlag, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual int prepare(XrdSfsPrep &pargs, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)=0
virtual int gpFile(gpfFunc &gpAct, XrdSfsGPFile &gpReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
virtual XrdSfsDirectory * newDir(XrdOucErrInfo &eInfo)
virtual int stat(const char *Name, struct stat *buf, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual int FAttr(XrdSfsFACtl *faReq, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0)
virtual int rem(const char *path, XrdOucErrInfo &eInfo, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual XrdSfsDirectory * newDir(char *user=0, int MonID=0)=0
@ gpfGet
Perform a file retrieval.
@ gpfCancel
Cancel this request.
@ gpfPut
Perform a file push.
virtual XrdSfsFile * newFile(XrdOucErrInfo &eInfo)
static const uint64_t Verify
Options for pgRead() and pgWrite() as noted below.
virtual int sync()=0
XrdOucErrInfo & error
virtual int SendData(XrdSfsDio *sfDio, XrdSfsFileOffset offset, XrdSfsXferSize size)
virtual int getMmap(void **Addr, off_t &Size)=0
virtual int open(const char *fileName, XrdSfsFileOpenMode openMode, mode_t createMode, const XrdSecEntity *client=0, const char *opaque=0)=0
virtual int sync(XrdSfsAio *aiop)=0
virtual int write(XrdSfsAio *aioparm)=0
virtual XrdSfsXferSize read(XrdSfsFileOffset offset, XrdSfsXferSize size)=0
virtual int checkpoint(cpAct act, struct iov *range=0, int n=0)
virtual int truncate(XrdSfsFileOffset fsize)=0
virtual ~XrdSfsFile()
Destructor.
virtual XrdSfsXferSize read(XrdSfsFileOffset offset, char *buffer, XrdSfsXferSize size)=0
@ cpTrunc
Truncate a file within checkpoint.
@ cpDelete
Delete an existing checkpoint.
@ cpRestore
Restore an active checkpoint and delete it.
@ cpWrite
Add data to an existing checkpoint.
@ cpQuery
Return checkpoint limits.
@ cpCreate
Create a checkpoint, one must not be active.
virtual const char * FName()=0
virtual int getCXinfo(char cxtype[4], int &cxrsz)=0
XrdSfsFile(XrdSfsFile &wrapF)
XrdSfsFile(const char *user=0, int MonID=0)
XrdSfsFile(XrdOucErrInfo &eInfo)
virtual int stat(struct stat *buf)=0
virtual void setXio(XrdSfsXio *xioP)
virtual int fctl(const int cmd, const char *args, XrdOucErrInfo &eInfo)=0
virtual XrdSfsXferSize pgRead(XrdSfsFileOffset offset, char *buffer, XrdSfsXferSize rdlen, uint32_t *csvec, uint64_t opts=0)
virtual XrdSfsXferSize write(XrdSfsFileOffset offset, const char *buffer, XrdSfsXferSize size)=0
virtual int close()=0
virtual int read(XrdSfsAio *aioparm)=0
virtual XrdSfsXferSize pgWrite(XrdSfsFileOffset offset, char *buffer, XrdSfsXferSize wrlen, uint32_t *csvec, uint64_t opts=0)