XRootD
Loading...
Searching...
No Matches
XrdPosixConfig.cc
Go to the documentation of this file.
1/******************************************************************************/
2/* */
3/* X r d P o s i x C o n f i g . c c */
4/* */
5/* (c) 2017 by the Board of Trustees of the Leland Stanford, Jr., University */
6/* All Rights Reserved */
7/* Produced by Andrew Hanushevsky for Stanford University under contract */
8/* DE-AC02-76-SFO0515 with the Department of Energy */
9/* */
10/* This file is part of the XRootD software suite. */
11/* */
12/* XRootD is free software: you can redistribute it and/or modify it under */
13/* the terms of the GNU Lesser General Public License as published by the */
14/* Free Software Foundation, either version 3 of the License, or (at your */
15/* option) any later version. */
16/* */
17/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20/* License for more details. */
21/* */
22/* You should have received a copy of the GNU Lesser General Public License */
23/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25/* */
26/* The copyright holder's institutional names and contributor's names may not */
27/* be used to endorse or promote products derived from this software without */
28/* specific prior written permission of the institution or contributor. */
29/******************************************************************************/
30
31#include <algorithm>
32#include <iostream>
33#include <memory>
34#include <set>
35#include <cstdio>
36#include <string>
37#include <unistd.h>
38#include <sys/stat.h>
39#include <sys/types.h>
40
44#include "XrdCl/XrdClURL.hh"
45
46#include "XrdOuc/XrdOucCache.hh"
47#include "XrdOuc/XrdOucEnv.hh"
48#include "XrdOuc/XrdOucPsx.hh"
49#include "XrdOuc/XrdOucTList.hh"
50
61
62#include "XrdRmc/XrdRmc.hh"
63
65
66#include "XrdSys/XrdSysE2T.hh"
67#include "XrdSys/XrdSysError.hh"
68#include "XrdSys/XrdSysTrace.hh"
69
70/******************************************************************************/
71/* S t a t i c M e m b e r s */
72/******************************************************************************/
73
74namespace XrdPosixGlobals
75{
76extern XrdScheduler *schedP;
80extern XrdSysError *eDest;
81extern XrdPosixStats Stats;
82extern XrdSysTrace Trace;
83extern int ddInterval;
84extern int ddMaxTries;
86extern bool oidsOK;
87extern bool p2lSRC;
88extern bool p2lSGI;
89extern bool autoPGRD;
90extern bool usingEC;
91};
92
93/******************************************************************************/
94/* L o c a l C l a s s e s */
95/******************************************************************************/
96
97namespace
98{
99class ConCleanup : public XrdSecsssCon
100{
101public:
102
104
105void Cleanup(const std::set<std::string> &Contacts, const XrdSecEntity &Entity)
106{
107 std::set<std::string>::iterator it;
108
109 for (it = Contacts.begin(); it != Contacts.end(); it++)
110 {if (Blab) DMSG("Cleanup", "Disconnecting " <<(*it).c_str());
111 PostMaster->ForceDisconnect(XrdCl::URL(*it), true);}
112}
113
114 ConCleanup(XrdCl::PostMaster *pm, bool dbg) : PostMaster(pm), Blab(dbg) {}
115 ~ConCleanup() {}
116
117private:
118
119XrdCl::PostMaster *PostMaster;
120bool Blab;
121};
122
123class ConTrack : public XrdCl::Job
124{
125public:
126
127void Run( void *ptr )
128 {XrdCl::URL *url = reinterpret_cast<XrdCl::URL*>( ptr );
129 const std::string &user = url->GetUserName();
130 const std::string host = url->GetHostId();
131 if (Blab) DMSG("Tracker", "Connecting to " <<host);
132 if (user.size()) sssCon.Contact(user, host);
133 delete url;
134 }
135
136 ConTrack(ConCleanup &cm, bool dbg) : sssCon(cm), Blab(dbg) {}
137 ~ConTrack() {}
138
139private:
140
141XrdSecsssCon &sssCon;
142bool Blab;
143};
144}
145
146/******************************************************************************/
147/* C o n T r a c k e r */
148/******************************************************************************/
149
151{
153 ConCleanup *cuHandler = new ConCleanup(pm, dbg);
154 std::unique_ptr<ConTrack> ctHandler(new ConTrack(*cuHandler, dbg));
155
156// Set the callback for new connections
157//
158 pm->SetOnConnectHandler( std::move( ctHandler ) );
159
160// Return the connection cleanup handler. Note that we split the task into
161// two objects so that we don't violate the semantics of unique pointer.
162//
163 return cuHandler;
164}
165
166/******************************************************************************/
167/* E n v I n f o */
168/******************************************************************************/
169
171{
172
173// Extract the pointer to the scheduler from the passed environment
174//
175 XrdPosixGlobals::schedP = (XrdScheduler *)theEnv.GetPtr("XrdScheduler*");
176
177// We no longer propogate the environment to the new-style cache via this
178// method as it picks it up during init time. We leave the code for historical
179// reasons but we really should have gotten rid of EnvInfo()!
180// if (XrdPosixGlobals::myCache2) XrdPosixGlobals::myCache2->EnvInfo(theEnv);
181
182// Test if XRDCL_EC is set. That env var. is set at XrdCl::PlugInManager::LoadFactory
183// in XrdClPlugInManager.cc, which is called (by XrdOssGetSS while loading
184// libXrdPss.so) before this function.
185 XrdPosixGlobals::usingEC = getenv("XRDCL_EC")? true : false;
186}
187
188/******************************************************************************/
189/* Private: i n i t C C M */
190/******************************************************************************/
191
192bool XrdPosixConfig::initCCM(XrdOucPsx &parms)
193{
194 static XrdPosixCache pCache;
195 const char *eTxt = "Unable to initialize cache context manager in";
196 const char *mPath;
197
198// Initialize the cache context manager
199//
200 if ((*parms.initCCM)(pCache, parms.theLogger, parms.configFN,
201 parms.CCMInfo(mPath), parms.theEnv)) return true;
202
203// Issue error message and return failure
204//
205 if (parms.theLogger)
206 {XrdSysError eDest(parms.theLogger, "Posix");
207 eDest.Emsg("InitCCM", eTxt, mPath);
208 } else {
209 std::cerr <<"Posix_InitCCM: " <<eTxt <<' ' <<mPath <<std::endl;
210 }
211 return false;
212}
213
214/******************************************************************************/
215/* Private: i n i t E n v */
216/******************************************************************************/
217
218// Parse options specified as a cgi string (i.e. var=val&var=val&...). Vars:
219
220// aprcalc=n - bytes at which to recalculate preread performance
221// aprminp - auto preread min read pages
222// aprperf - auto preread performance
223// aprtrig=n - auto preread min read length (can be suffized in k, m, g).
224// cachesz=n - the size of the cache in bytes (can be suffized in k, m, g).
225// debug=n - debug level (0 off, 1 low, 2 medium, 3 high).
226// max2cache=n - maximum read to cache (can be suffized in k, m, g).
227// maxfiles=n - maximum number of files to support.
228// minp=n - minimum number of pages needed.
229// mode={c|s} - running as a client (default) or server.
230// optlg=1 - log statistics
231// optpr=1 - enable pre-reads
232// optsf=<val> - optimize structured file: 1 = all, 0 = off, .<sfx> specific
233// optwr=1 - cache can be written to.
234// pagesz=n - individual byte size of a page (can be suffized in k, m, g).
235//
236
237void XrdPosixConfig::initEnv(char *eData)
238{
239 static XrdRmc dramCache;
240 XrdRmc::Parms myParms;
241 XrdOucEnv theEnv(eData);
243 long long Val;
244 char * tP;
245
246// Get numeric type variable (errors force a default)
247//
248 initEnv(theEnv, "aprcalc", Val); if (Val >= 0) apParms.prRecalc = Val;
249 initEnv(theEnv, "aprminp", Val); if (Val >= 0) apParms.minPages = Val;
250 initEnv(theEnv, "aprperf", Val); if (Val >= 0) apParms.minPerf = Val;
251 initEnv(theEnv, "aprtrig", Val); if (Val >= 0) apParms.Trigger = Val;
252 initEnv(theEnv, "cachesz", Val); if (Val >= 0) myParms.CacheSize = Val;
253 initEnv(theEnv, "maxfiles", Val); if (Val >= 0) myParms.MaxFiles = Val;
254 initEnv(theEnv, "max2cache", Val); if (Val >= 0) myParms.Max2Cache = Val;
255 initEnv(theEnv, "minpages", Val); if (Val >= 0)
256 {if (Val > 32767) Val = 32767;
257 myParms.minPages = Val;
258 }
259 initEnv(theEnv, "pagesz", Val); if (Val >= 0) myParms.PageSize = Val;
260
261// Get Debug setting
262//
263 if ((tP = theEnv.Get("debug")))
264 {if (*tP >= '0' && *tP <= '3') myParms.Options |= (*tP - '0');
265 else DMSG("initEnv", "'XRDPOSIX_CACHE=debug=" <<tP <<"' is invalid.");
266 }
267
268// Get Mode
269//
270 if ((tP = theEnv.Get("mode")))
271 {if (*tP == 's') myParms.Options |= XrdRmc::isServer;
272 else if (*tP != 'c') DMSG("initEnv","'XRDPOSIX_CACHE=mode=" <<tP
273 <<"' is invalid.");
274 }
275
276// Get the structured file option
277//
278 if ((tP = theEnv.Get("optsf")) && *tP && *tP != '0')
279 { if (*tP == '1') myParms.Options |= XrdRmc::isStructured;
280 else if (*tP == '.') {XrdPosixFile::sfSFX = strdup(tP);
281 XrdPosixFile::sfSLN = strlen(tP);
282 }
283 else DMSG("initEnv", "'XRDPOSIX_CACHE=optfs=" <<tP
284 <<"' is invalid.");
285 }
286
287// Get final options, any non-zero value will do here
288//
289 if ((tP = theEnv.Get("optlg")) && *tP && *tP != '0')
290 myParms.Options |= XrdRmc::logStats;
291 if ((tP = theEnv.Get("optpr")) && *tP && *tP != '0')
292 myParms.Options |= XrdRmc::canPreRead;
293// if ((tP = theEnv.Get("optwr")) && *tP && *tP != '0') isRW = 1;
294
295// Now allocate a cache. Indicate that we already serialize the I/O to avoid
296// additional but unnecessary locking.
297//
298 myParms.Options |= XrdRmc::Serialized;
299 if (!(XrdPosixGlobals::theCache = dramCache.Create(myParms, &apParms)))
300 {DMSG("initEnv", XrdSysE2T(errno) <<" creating cache.");}
301}
302
303/******************************************************************************/
304
305void XrdPosixConfig::initEnv(XrdOucEnv &theEnv, const char *vName, long long &Dest)
306{
307 char *eP, *tP;
308
309// Extract variable
310//
311 Dest = -1;
312 if (!(tP = theEnv.Get(vName)) || !(*tP)) return;
313
314// Convert the value
315//
316 errno = 0;
317 Dest = strtoll(tP, &eP, 10);
318 if (Dest > 0 || (!errno && tP != eP))
319 {if (!(*eP)) return;
320 if (*eP == 'k' || *eP == 'K') Dest *= 1024LL;
321 else if (*eP == 'm' || *eP == 'M') Dest *= 1024LL*1024LL;
322 else if (*eP == 'g' || *eP == 'G') Dest *= 1024LL*1024LL*1024LL;
323 else if (*eP == 't' || *eP == 'T') Dest *= 1024LL*1024LL*1024LL*1024LL;
324 else eP--;
325 if (*(eP+1))
326 {DMSG("initEnv", "'XRDPOSIX_CACHE=" <<vName <<'=' <<tP
327 <<"' is invalid.");
328 Dest = -1;
329 }
330 }
331}
332
333/******************************************************************************/
334/* i n i t S t a t */
335/******************************************************************************/
336
338{
339 static int initStat = 0;
340 static dev_t st_rdev;
341 static dev_t st_dev;
342 static uid_t myUID = getuid();
343 static gid_t myGID = getgid();
344
345// Initialize the xdev fields. This cannot be done in the constructor because
346// we may not yet have resolved the C-library symbols.
347//
348 if (!initStat) {initStat = 1; initXdev(st_dev, st_rdev);}
349 memset(buf, 0, sizeof(struct stat));
350
351// Preset common fields
352//
353 buf->st_blksize= 64*1024;
354 buf->st_dev = st_dev;
355 buf->st_rdev = st_rdev;
356 buf->st_nlink = 1;
357 buf->st_uid = myUID;
358 buf->st_gid = myGID;
359}
360
361/******************************************************************************/
362/* i n i t X d e v */
363/******************************************************************************/
364
365void XrdPosixConfig::initXdev(dev_t &st_dev, dev_t &st_rdev)
366{
367 static dev_t tDev, trDev;
368 static bool aOK = false;
369 struct stat buf;
370
371// Get the device id for /tmp used by stat()
372//
373 if (aOK) {st_dev = tDev; st_rdev = trDev;}
374 else if (stat("/tmp", &buf)) {st_dev = 0; st_rdev = 0;}
375 else {st_dev = tDev = buf.st_dev;
376 st_rdev = trDev = buf.st_rdev;
377 aOK = true;
378 }
379}
380
381/******************************************************************************/
382/* O p e n F C */
383/******************************************************************************/
384
385bool XrdPosixConfig::OpenFC(const char *path, int oflag, mode_t mode,
386 XrdPosixInfo &Info)
387{
388 int rc = XrdPosixXrootd::Open(path, oflag, mode, Info.cbP, &Info);
389
390// Check if we actually can open the file directly via the cache
391//
392 if (rc == -3)
393 {if (*Info.cachePath && errno == 0 && Info.ffReady) return true;
394 rc = -1;
395 if (!errno) errno = ENOPROTOOPT;
396 }
397
398// Return actual result
399//
400 Info.fileFD = rc;
401 return false;
402}
403
404/******************************************************************************/
405/* S e t C o n f i g */
406/******************************************************************************/
407
409{
410 XrdOucTList *tP;
411 const char *val;
412
413// Set log routing
414//
417
418// Create an error object if we have a logger
419//
420 if (parms.theLogger)
421 XrdPosixGlobals::eDest = new XrdSysError(parms.theLogger, "Posix");
422
423// Set networking mode
424//
425 SetIPV4(parms.useV4);
426
427// Handle the Name2Name for pfn2lfn translations.
428//
429 if (parms.xPfn2Lfn)
431 if (parms.xPfn2Lfn == parms.xP2Lsrc || parms.xPfn2Lfn == parms.xP2Lsgi)
435 }
436
437// Handle client settings
438//
439 if ((tP = parms.setFirst))
440 do {SetEnv(tP->text, tP->val);
441 tP = tP->next;
442 } while(tP);
443
444// Handle debug and trace settings
445//
446 if (parms.traceLvl || parms.debugLvl)
447 {if (parms.debugLvl) SetDebug(parms.debugLvl);
448 else SetDebug(parms.traceLvl);
450 }
451
452// Handle number of response handlers we should keep
453//
454 if (parms.maxRHCB > 0) XrdPosixFileRH::SetMax(parms.maxRHCB);
455
456// Set delayed destro parameters if present
457//
458 if (parms.cioWait > 0 && parms.cioTries > 0)
459 {XrdPosixGlobals::ddMaxTries = (parms.cioTries < 2 ? 2 : parms.cioTries);
460 XrdPosixGlobals::ddInterval = (parms.cioWait < 10 ? 10 : parms.cioWait);
461 }
462
463// Set auto conversion of read to pgread
464//
465 if (parms.theCache && parms.theEnv && (val = parms.theEnv->Get("psx.CSNet")))
466 {if (*val == '1' || *val == '2')
468 if (*val == '2') SetEnv("WantTlsOnNoPgrw", 1);
469 }
470 }
471
472// Handle the caching options (library or builin memory).
473// TODO: Make the memory cache a library plugin as well.
474//
475 if (parms.theCache)
477 if (parms.initCCM) return initCCM(parms);
478 return true;
479 }
480 else if (parms.mCache && *parms.mCache) initEnv(parms.mCache);
481
482 return true;
483}
484
485/******************************************************************************/
486/* Private: S e t D e b u g */
487/******************************************************************************/
488
489void XrdPosixConfig::SetDebug(int val)
490{
491 const std::string dbgType[] = {"Error", "Warning", "Info", "Debug", "Dump"};
492
493// The default is none but once set it cannot be unset in the client
494//
495 if (val > 0)
496 {if (val > 5) val = 5;
497 XrdCl::DefaultEnv::SetLogLevel(dbgType[val-1]);
498 }
499
500// Now set the internal one which can be toggled
501//
502 XrdPosixMap::SetDebug(val > 0);
503}
504
505/******************************************************************************/
506/* S e t E n v */
507/******************************************************************************/
508
509void XrdPosixConfig::SetEnv(const char *kword, int kval)
510{
512 static bool dlfSet = false;
513
514// Check for internal envars before setting the external one
515//
516 if (!strcmp(kword, "DirlistAll"))
519 dlfSet = true;
520 }
521 else if (!strcmp(kword, "DirlistDflt"))
522 {if (!dlfSet)
525 }
526 else env->PutInt((std::string)kword, kval);
527}
528
529/******************************************************************************/
530/* Private: S e t I P V 4 */
531/******************************************************************************/
532
533void XrdPosixConfig::SetIPV4(bool usev4)
534{
535 const char *ipmode = (usev4 ? "IPv4" : "IPAll");
537
538// Set the env value
539//
540 env->PutString((std::string)"NetworkStack", (const std::string)ipmode);
541}
542
543/******************************************************************************/
544/* s e t O i d s */
545/******************************************************************************/
546
548{
550}
551
552/******************************************************************************/
553/* S t a t s C a c h e */
554/******************************************************************************/
555
556int XrdPosixConfig::Stats(const char *theID, char *buff, int blen)
557{
558 static const char stats1[] = "<stats id=\"%s\">"
559 "<open>%lld<errs>%lld</errs></open>"
560 "<close>%lld<errs>%lld</errs></close>"
561 "</stats>";
562
563 static const char stats2[] = "<stats id=\"cache\" type=\"%s\">"
564 "<prerd><in>%lld</in><hits>%lld</hits><miss>%lld</miss></prerd>"
565 "<rd><in>%lld</in><out>%lld</out>"
566 "<hits>%lld</hits><miss>%lld</miss>"
567 "</rd>"
568 "<pass>%lld<cnt>%lld</cnt></pass>"
569 "<wr><out>%lld</out><updt>%lld</updt></wr>"
570 "<saved>%lld</saved><purge>%lld</purge>"
571 "<files><opened>%lld</opened><closed>%lld</closed><new>%lld</new>"
572 "<del>%lld</del><now>%lld</now><full>%lld</full>"
573 "</files>"
574 "<store><size>%lld</size><used>%lld</used>"
575 "<min>%lld</min><max>%lld</max>"
576 "</store>"
577 "<mem><size>%lld</size><used>%lld</used><wq>%lld</wq></mem>"
578 "<opcl><odefer>%lld</odefer><defero>%lld</defero>"
579 "<cdefer>%lld</cdefer><clost>%lld</clost>"
580 "</opcl>"
581 "</stats>";
582
583// If the caller want the maximum length, then provide it.
584//
585 if (!blen)
586 {size_t n;
587 int len1, digitsLL = strlen("9223372036854775807");
588 std::string fmt = stats1;
589 n = std::count(fmt.begin(), fmt.end(), '%');
590 len1 = fmt.size() + (digitsLL*n) - (n*3) + strlen(theID);
591 if (!XrdPosixGlobals::theCache) return len1;
592 fmt = stats2;
593 n = std::count(fmt.begin(), fmt.end(), '%');
594 return len1 + fmt.size() + (digitsLL*n) - (n*3) + 8;
595 }
596
597// Get the standard statistics
598//
601
602// Format the line
603//
604 int k = snprintf(buff, blen, stats1, theID,
605 Y.X.Opens, Y.X.OpenErrs, Y.X.Closes, Y.X.CloseErrs);
606
607// If there is no cache then there nothing to return
608//
609 if (!XrdPosixGlobals::theCache) return k;
610 buff += k; blen -= k;
611
612// Get the statistics
613//
616
617// Format the statisics into the supplied buffer
618//
619 int n = snprintf(buff, blen, stats2, XrdPosixGlobals::theCache->CacheType,
620 Z.X.BytesPead, Z.X.HitsPR, Z.X.MissPR,
621 Z.X.BytesRead, Z.X.BytesGet, Z.X.Hits, Z.X.Miss,
622 Z.X.BytesPass, Z.X.Pass,
623 Z.X.BytesWrite, Z.X.BytesPut,
627 Z.X.DiskSize, Z.X.DiskUsed,
628 Z.X.DiskMin, Z.X.DiskMax,
629 Z.X.MemSize, Z.X.MemUsed, Z.X.MemWriteQ,
632 );
633
634// Return the right value
635//
636 return (n < blen ? n+k : 0);
637}
#define TRACE_Debug
static XrdSysError eDest(0,"crypto_")
#define DMSG(x, y)
#define stat(a, b)
Definition XrdPosix.hh:101
const char * XrdSysE2T(int errcode)
Definition XrdSysE2T.cc:104
static PostMaster * GetPostMaster()
Get default post master.
static void SetLogLevel(const std::string &level)
static Env * GetEnv()
Get default client environment.
bool PutInt(const std::string &key, int value)
Definition XrdClEnv.cc:110
bool PutString(const std::string &key, const std::string &value)
Definition XrdClEnv.cc:52
Interface for a job to be run by the job manager.
virtual void Run(void *arg)=0
The job logic.
A hub for dispatching and receiving messages.
void SetOnConnectHandler(std::unique_ptr< Job > onConnJob)
Set the global connection error handler.
URL representation.
Definition XrdClURL.hh:31
std::string GetHostId() const
Get the host part of the URL (user:password@host:port)
Definition XrdClURL.hh:99
const std::string & GetUserName() const
Get the username.
Definition XrdClURL.hh:135
void Get(XrdOucCacheStats &D)
struct XrdOucCacheStats::CacheStats X
XrdOucCacheStats Statistics
char * Get(const char *varname)
Definition XrdOucEnv.hh:69
void * GetPtr(const char *varname)
Definition XrdOucEnv.cc:263
XrdOucEnv * theEnv
Definition XrdOucPsx.hh:80
bool useV4
Definition XrdOucPsx.hh:92
int maxRHCB
Definition XrdOucPsx.hh:87
static const int xP2Lsgi
Definition XrdOucPsx.hh:100
char * configFN
Definition XrdOucPsx.hh:78
char * mCache
Definition XrdOucPsx.hh:84
int traceLvl
Definition XrdOucPsx.hh:88
int cioTries
Definition XrdOucPsx.hh:91
char xPfn2Lfn
Definition XrdOucPsx.hh:94
XrdOucCache * theCache
Definition XrdOucPsx.hh:82
int cioWait
Definition XrdOucPsx.hh:90
XrdOucTList * setFirst
Definition XrdOucPsx.hh:85
static const int xP2Lsrc
Definition XrdOucPsx.hh:99
int debugLvl
Definition XrdOucPsx.hh:89
XrdOucName2Name * theN2N
Definition XrdOucPsx.hh:81
XrdOucCacheCMInit_t initCCM
Definition XrdOucPsx.hh:83
const char * CCMInfo(const char *&path)
Definition XrdOucPsx.hh:52
XrdSysLogger * theLogger
Definition XrdOucPsx.hh:79
XrdOucTList * next
static void SetEnv(const char *kword, int kval)
static bool OpenFC(const char *path, int oflag, mode_t mode, XrdPosixInfo &Info)
static void setOids(bool isok)
static XrdSecsssCon * conTracker(bool debug=false)
static int Stats(const char *theID, char *buff, int blen)
static void initStat(struct stat *buf)
static void EnvInfo(XrdOucEnv &theEnv)
static bool SetConfig(XrdOucPsx &parms)
static void SetMax(int mval)
static char * sfSFX
static short sfSLN
static void SetDebug(bool dbg)
void Get(XrdPosixStats &D)
struct XrdPosixStats::PosixStats X
static int Open(const char *path, int oflag, mode_t mode=0, XrdPosixCallBack *cbP=0)
static const int Serialized
Caller ensures MRSW semantics.
Definition XrdRmc.hh:130
static XrdOucCache * Create(Parms &Params, XrdOucCacheIO::aprParms *aprP=0)
Definition XrdRmc.cc:40
static const int logStats
Display statistics upon detach.
Definition XrdRmc.hh:127
static const int isServer
This is server application; not a user application.
Definition XrdRmc.hh:118
static const int isStructured
Definition XrdRmc.hh:121
static const int canPreRead
Enable pre-read operations (o/w ignored)
Definition XrdRmc.hh:124
bool Contact(const std::string &lgnid, const std::string &hostID)
virtual void Cleanup(const std::set< std::string > &Contacts, const XrdSecEntity &Entity)=0
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
void SetLogger(XrdSysLogger *logp)
XrdOucEnv theEnv
XrdScheduler * schedP
XrdSysLogger * theLogger
XrdPosixStats Stats
XrdSysError * eDest
XrdOucCache * theCache
XrdOucName2Name * theN2N
XrdSysTrace Trace
XrdCl::DirListFlags::Flags dlFlag
@ None
Nothing special.
Parameters for a newly created memory cache.
Definition XrdRmc.hh:101
int MaxFiles
Maximum number of files (default 256 or 8K)
Definition XrdRmc.hh:104
int PageSize
Size of each page in bytes (default 32KB)
Definition XrdRmc.hh:102
long long CacheSize
Size of cache in bytes (default 100MB)
Definition XrdRmc.hh:101
int Max2Cache
Largest read to cache (default PageSize)
Definition XrdRmc.hh:103
short minPages
Minimum number of pages (default 256)
Definition XrdRmc.hh:106
int Options
Options as defined below (default r/o cache)
Definition XrdRmc.hh:105