XRootD
XrdRmcData Class Reference

#include <XrdRmcData.hh>

+ Inheritance diagram for XrdRmcData:
+ Collaboration diagram for XrdRmcData:

Public Member Functions

 XrdRmcData (XrdRmcReal *cP, XrdOucCacheIO *ioP, long long vn, int opts)
 
bool Detach (XrdOucCacheIOCD &iocd)
 
long long FSize ()
 
const char * Path ()
 
void Preread ()
 
void Preread (aprParms &Parms)
 
void Preread (long long Offs, int rLen, int Opts=0)
 
int Read (char *Buffer, long long Offset, int Length)
 
int Sync ()
 
int Trunc (long long Offset)
 
int Write (char *Buffer, long long Offset, int Length)
 
- Public Member Functions inherited from XrdOucCacheIO
 XrdOucCacheIO ()
 Construct and Destructor. More...
 
virtual int Fstat (struct stat &sbuff)
 
virtual const char * Location (bool refresh=false)
 
virtual int pgRead (char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0)
 
virtual void pgRead (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rdlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0)
 
virtual int pgWrite (char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0)
 
virtual void pgWrite (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wrlen, std::vector< uint32_t > &csvec, uint64_t opts=0, int *csfix=0)
 
virtual void Read (XrdOucCacheIOCB &iocb, char *buff, long long offs, int rlen)
 
virtual int ReadV (const XrdOucIOVec *readV, int rnum)
 
virtual void ReadV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *readV, int rnum)
 
virtual void Sync (XrdOucCacheIOCB &iocb)
 
virtual void Trunc (XrdOucCacheIOCB &iocb, long long offs)
 
virtual void Update (XrdOucCacheIO &iocp)
 
virtual void Write (XrdOucCacheIOCB &iocb, char *buff, long long offs, int wlen)
 
virtual int WriteV (const XrdOucIOVec *writV, int wnum)
 
virtual void WriteV (XrdOucCacheIOCB &iocb, const XrdOucIOVec *writV, int wnum)
 

Static Public Member Functions

static int setAPR (aprParms &Dest, aprParms &Src, int pSize)
 

Additional Inherited Members

- Static Public Attributes inherited from XrdOucCacheIO
static const uint64_t forceCS = 0x0000000000000001ULL
 
static const int SingleUse = 0x0001
 Mark pages for single use. More...
 
- Protected Member Functions inherited from XrdOucCacheIO
virtual ~XrdOucCacheIO ()
 

Detailed Description

Definition at line 42 of file XrdRmcData.hh.

Constructor & Destructor Documentation

◆ XrdRmcData()

XrdRmcData::XrdRmcData ( XrdRmcReal cP,
XrdOucCacheIO ioP,
long long  vn,
int  opts 
)

Definition at line 42 of file XrdRmcData.cc.

44  : pPLock(0), rPLock(0), wPLock(0),
45  Cache(cP), ioObj(ioP), VNum(vn)
46 {
47 // We need to map the cache options to our local options
48 //
49  isFIS = (opts & XrdOucCache::optFIS ? 1 : 0);
50  isRW = (opts & XrdOucCache::optRW ? okRW : 0);
51 
52 // Copy some values from the cache to our local area for convenience
53 //
54  SegShft = Cache->SegShft;
55  OffMask = Cache->OffMask;
56  SegSize = Cache->SegSize;
57  maxCache = Cache->maxCache;
58  Debug = Cache->Dbg;
59 
60 // Initialize the pre-read area
61 //
62  memset(prRR, -1, sizeof(prRR) );
63  memset(prBeg, -1, sizeof(prBeg));
64  memset(prEnd, -1, sizeof(prEnd));
65  memset(prOpt, 0, sizeof(prOpt));
66 
67  prNSS =-1;
68  prRRNow = 0;
69  prStop = 0;
70  prNext = prFree = 0;
71  prActive = 0;
72  prOK = (Cache->prNum ? 1 : 0);
73  prReq.Data = this;
74  prAuto = (prOK ? setAPR(Apr, Cache->aprDefault, SegSize) : 0);
75  prPerf = 0;
76  prCalc = Apr.prRecalc;
77 
78 // Establish serialization options
79 //
80  if (Cache->Options & XrdRmc::ioMTSafe) pPLopt = rPLopt = xs_Shared;
81  else pPLopt = rPLopt = xs_Exclusive;
82 
83 // Establish serialization handling (only needed for r/w files)
84 //
85  if (Cache->Options & XrdRmc::Serialized)
86  {if (Cache->Options & XrdRmc::ioMTSafe)
87  {if (isRW && prOK) pPLock = wPLock = &rwLock;}
88  else if (prOK) rPLock = pPLock = wPLock = &rwLock;
89  } else if (!(Cache->Options & XrdRmc::ioMTSafe) || isRW)
90  rPLock = pPLock = wPLock = &rwLock;
91 }
struct myOpts opts
@ xs_Exclusive
Definition: XrdSysXSLock.hh:38
@ xs_Shared
Definition: XrdSysXSLock.hh:38
static const int optRW
File is read/write (o/w read/only)
Definition: XrdOucCache.hh:517
static const int optFIS
File is structured (e.g. root file)
Definition: XrdOucCache.hh:516
static int setAPR(aprParms &Dest, aprParms &Src, int pSize)
Definition: XrdRmcData.cc:489
static const int Serialized
Caller ensures MRSW semantics.
Definition: XrdRmc.hh:130
static const int ioMTSafe
CacheIO object is MT-safe.
Definition: XrdRmc.hh:133

References XrdRmc::ioMTSafe, XrdOucCache::optFIS, XrdOucCache::optRW, opts, XrdOucCacheIO::aprParms::prRecalc, XrdRmc::Serialized, setAPR(), xs_Exclusive, and xs_Shared.

+ Here is the call graph for this function:

Member Function Documentation

◆ Detach()

bool XrdRmcData::Detach ( XrdOucCacheIOCD iocd)
virtual

Detach this CacheIO object from the cache.

Note
This method must be called instead of using the delete operator since CacheIO objects may have multiple outstanding references and actual deletion may need to be deferred.
Parameters
iocdreference to the detach complete callback object.
Returns
true Deletion can occur immediately. There is no outstanding I/O.
false Deletion must be deferred until it is safe to so from the cache perspective. At which point, the cache will call the DetachDone() method in the passed callback object. No locks may be held with respect to the CacheIO object when this is done to avoid deadlocks.

Implements XrdOucCacheIO.

Definition at line 97 of file XrdRmcData.cc.

98 {
99  int delOK;
100 
101 // We must wait for any pre-reads to stop at this point. TO DO: We really
102 // should run this in a sperate thread and use the callback mechanism.
103 //
104  DMutex.Lock();
105  if (prActive)
106  {XrdSysSemaphore prDone(0);
107  prStop = &prDone;
108  DMutex.UnLock();
109  prDone.Wait();
110  DMutex.Lock();
111  }
112 
113 // Get exclusive control
114 //
115  rwLock.Lock(xs_Exclusive);
116 
117 // We can now detach ourselves from the cache
118 //
119  delOK = Cache->Detach(ioObj);
120  DMutex.UnLock();
121  rwLock.UnLock(xs_Exclusive);
122 
123 // Check if we should delete ourselves and if so add our stats to the cache
124 //
125  if (delOK)
126  {Cache->Statistics.Add(Statistics);
127  if (Cache->Lgs)
128  {char sBuff[4096];
129  snprintf(sBuff, sizeof(sBuff),
130  "Cache: Stats: %lld Read; %lld Get; %lld Pass; "
131  "%lld Write; %lld Put; %lld Hits; %lld Miss; "
132  "%lld pead; %lld HitsPR; %lld MissPR; Path %s\n",
133  Statistics.X.BytesRead, Statistics.X.BytesGet,
134  Statistics.X.BytesPass, Statistics.X.BytesWrite,
135  Statistics.X.BytesPut,
136  Statistics.X.Hits, Statistics.X.Miss,
137  Statistics.X.BytesPead,
138  Statistics.X.HitsPR, Statistics.X.MissPR,
139  ioObj->Path());
140  std::cerr <<sBuff;
141  }
142  delete this;
143  return true;
144  }
145 // TO DO: We should issue a message here as this will cause a memory leak
146 // as we won't try to do the detavh again.
147 //
148  return false;
149 }
virtual const char * Path()=0
void Add(XrdOucCacheStats &S)
struct XrdOucCacheStats::CacheStats X
XrdOucCacheStats Statistics
Definition: XrdOucCache.hh:686
void Lock(const XrdSysXS_Type usage)
Definition: XrdSysXSLock.cc:55
void UnLock(const XrdSysXS_Type usage=xs_None)
Definition: XrdSysXSLock.cc:95

References XrdOucCacheStats::Add(), XrdOucCacheStats::CacheStats::BytesGet, XrdOucCacheStats::CacheStats::BytesPass, XrdOucCacheStats::CacheStats::BytesPead, XrdOucCacheStats::CacheStats::BytesPut, XrdOucCacheStats::CacheStats::BytesRead, XrdOucCacheStats::CacheStats::BytesWrite, XrdOucCacheStats::CacheStats::Hits, XrdOucCacheStats::CacheStats::HitsPR, XrdSysMutex::Lock(), XrdSysXSLock::Lock(), XrdOucCacheStats::CacheStats::Miss, XrdOucCacheStats::CacheStats::MissPR, XrdOucCacheIO::Path(), XrdOucCache::Statistics, XrdSysMutex::UnLock(), XrdSysXSLock::UnLock(), XrdSysSemaphore::Wait(), XrdOucCacheStats::X, and xs_Exclusive.

+ Here is the call graph for this function:

◆ FSize()

long long XrdRmcData::FSize ( )
inlinevirtual

Obtain size of the file.

Returns
Size of the file in bytes.

Implements XrdOucCacheIO.

Definition at line 48 of file XrdRmcData.hh.

48 {return (ioObj ? ioObj->FSize() : 0);}
virtual long long FSize()=0

References XrdOucCacheIO::FSize().

+ Here is the call graph for this function:

◆ Path()

const char* XrdRmcData::Path ( )
inlinevirtual

Get the path associated with this object.

Returns
Pointer to the path.

Implements XrdOucCacheIO.

Definition at line 50 of file XrdRmcData.hh.

50 {return ioObj->Path();}

References XrdOucCacheIO::Path().

+ Here is the call graph for this function:

◆ Preread() [1/3]

void XrdRmcData::Preread ( )

Definition at line 155 of file XrdRmcData.cc.

156 {
157  MrSw EnforceMrSw(pPLock, pPLopt);
158  long long segBeg, segEnd;
159  int oVal, pVal = 0, rLen, noIO, bPead = 0, prPages = 0;
160  char *cBuff;
161 
162 // Check if we are stopping, if so, ignore this request
163 //
164  DMutex.Lock();
165  if (prStop)
166  {prActive = 0;
167  prStop->Post();
168  DMutex.UnLock();
169  return;
170  }
171 
172 // Do the next pre-read in the queue (it's possible another may get in)
173 //
174 do{if ((oVal = prOpt[prNext]))
175  {segBeg = prBeg[prNext]; segEnd = prEnd[prNext];
176  prOpt[prNext++] = 0;
177  if (prNext >= prMax) prNext = 0;
178  if (oVal == prSKIP) continue;
179  prActive = prRun;
180  if (Debug > 1) std::cerr <<"prD: beg " <<(VNum >>XrdRmcReal::Shift) <<' '
181  <<(segEnd-segBeg+1)*SegSize <<'@' <<(segBeg*SegSize)
182  <<" f=" <<int(oVal) <<' ' <<ioObj->Path() <<std::endl;
183  DMutex.UnLock();
184  oVal = (oVal == prSUSE ? XrdRmcSlot::isSUSE : 0) | XrdRmcSlot::isNew;
185  segBeg |= VNum; segEnd |= VNum;
186  do {if ((cBuff = Cache->Get(ioObj, segBeg, rLen, noIO)))
187  {if (noIO) pVal = 0;
188  else {pVal = oVal; bPead += rLen; prPages++;}
189  }
190  } while(cBuff && Cache->Ref(cBuff, 0, pVal) && segBeg++ < segEnd);
191  if (Debug > 1) std::cerr <<"PrD: end " <<(VNum >>XrdRmcReal::Shift)
192  <<' ' <<prPages <<" pgs " <<bPead <<std::endl;
193  if (bPead)
194  {Statistics.Lock();
195  Statistics.X.BytesPead += bPead;
196  Statistics.X.MissPR += prPages;
197  Statistics.UnLock();
198  }
199  DMutex.Lock();
200  }
201  } while(oVal);
202 
203 // See if we should schedule the next preread or stop
204 //
205  if (prStop)
206  {prActive = 0;
207  prStop->Post();
208  } else if (prOpt[prNext])
209  {prActive = prWait;
210  Cache->PreRead(&prReq);
211  } else prActive = 0;
212 
213 // All done here
214 //
215  DMutex.UnLock();
216 }
void PreRead()
Definition: XrdRmcReal.cc:456
static const int isNew
Definition: XrdRmcSlot.hh:148
static const int isSUSE
Definition: XrdRmcSlot.hh:147

References XrdOucCacheStats::CacheStats::BytesPead, XrdRmcSlot::isNew, XrdRmcSlot::isSUSE, XrdOucCacheStats::Lock(), XrdSysMutex::Lock(), XrdOucCacheStats::CacheStats::MissPR, XrdOucCacheIO::Path(), XrdSysSemaphore::Post(), XrdRmcReal::PreRead(), XrdOucCacheStats::UnLock(), XrdSysMutex::UnLock(), and XrdOucCacheStats::X.

+ Here is the call graph for this function:

◆ Preread() [2/3]

void XrdRmcData::Preread ( aprParms Parms)
virtual

Reimplemented from XrdOucCacheIO.

Definition at line 239 of file XrdRmcData.cc.

240 {
241 
242 // Establish the new feature set if prereads are enabled
243 //
244  if (prOK)
245  {DMutex.Lock();
246  prAuto = setAPR(Apr, Parms, SegSize);
247  DMutex.UnLock();
248  }
249 }

References XrdSysMutex::Lock(), setAPR(), and XrdSysMutex::UnLock().

+ Here is the call graph for this function:

◆ Preread() [3/3]

void XrdRmcData::Preread ( long long  Offs,
int  rLen,
int  Opts = 0 
)
virtual

Reimplemented from XrdOucCacheIO.

Definition at line 220 of file XrdRmcData.cc.

221 {
222  int How;
223 
224 // Determine how to place the pages. We do this via assignment to avoid a gcc
225 // bug that doesn't optimize out static const int's except via assignment.
226 //
227  if (Opts & SingleUse) How = prSUSE;
228  else How = prLRU;
229 
230 // Verify that this preread will succeed then schedule it if so
231 //
232  if (prOK && rLen > 0 && Offs > 0
233  && Offs < XrdRmcReal::MaxFO && (Offs + rLen) < XrdRmcReal::MaxFO) return;
234  QueuePR(Offs>>SegShft, rLen, How);
235 }
static const int SingleUse
Mark pages for single use.
Definition: XrdOucCache.hh:279
int Opts
Definition: XrdMpxStats.cc:58

References XrdMpx::Opts, and XrdOucCacheIO::SingleUse.

◆ Read()

int XrdRmcData::Read ( char *  buff,
long long  offs,
int  rlen 
)
virtual

Perform an synchronous read.

Parameters
buffpointer to the buffer to receive the results. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
rlenthe number of bytes to read.
Returns
< 0 - Read failed, value is -errno. >=0 - Read succeeded, value is number of bytes read.

Implements XrdOucCacheIO.

Definition at line 337 of file XrdRmcData.cc.

338 {
339  MrSw EnforceMrSw(rPLock, rPLopt);
340  XrdOucCacheStats Now;
341  char *cBuff, *Dest = Buff;
342  long long segOff, segNum = (Offs >> SegShft);
343  int noIO, rAmt, rGot, doPR = prAuto, rLeft = rLen;
344 
345 // Verify read length and offset
346 //
347  if (rLen <= 0) return 0;
348  if (XrdRmcReal::MaxFO < Offs || Offs < 0
349  || XrdRmcReal::MaxFO < (Offs + rLen)) return -EOVERFLOW;
350 
351 // Check for preread request and Determine how to place the pages.
352 //
353  if (!Buff)
354  {int How;
355  if (rLen > maxCache) How = prSUSE;
356  else How = prLRU;
357  QueuePR(segNum, rLen, How);
358  return 0;
359  }
360 
361 // Ignore caching it if it's too large. Use alternate read algorithm.
362 //
363  if (rLen > maxCache) return Read(Now, Buff, Offs, rLen);
364 
365 // We check now whether or not we will try to do a preread later. This is
366 // advisory at this point so we don't need to obtain any locks to do this.
367 //
368  if (doPR)
369  {if (rLen >= Apr.Trigger) doPR = 0;
370  else for (noIO = 0; noIO < prRRMax; noIO++)
371  if (prRR[noIO] == segNum) {doPR = 0; break;}
372  if (doPR)
373  {DMutex.Lock();
374  prRR[prRRNow] = segNum;
375  prRRNow = (prRRNow+1)%prRRMax;
376  DMutex.UnLock();
377  }
378  }
379  if (Debug > 1) std::cerr <<"Rdr: " <<rLen <<'@' <<Offs <<" pr=" <<doPR <<std::endl;
380 
381 // Get the segment pointer, offset and the initial read amount
382 //
383  segNum|= VNum;
384  segOff = Offs & OffMask;
385  rAmt = SegSize - segOff;
386  if (rAmt > rLen) rAmt = rLen;
387 
388 // Now fault the pages in
389 //
390  while((cBuff = Cache->Get(ioObj, segNum, rGot, noIO)))
391  {if (rGot <= segOff + rAmt) rAmt = (rGot <= segOff ? 0 : rGot-segOff);
392  if (rAmt) {memcpy(Dest, cBuff+segOff, rAmt);
393  Dest += rAmt; Offs += rAmt; Now.X.BytesGet += rGot;
394  }
395  if (noIO) {Now.X.Hits++; if (noIO < 0) Now.X.HitsPR++;}
396  else {Now.X.Miss++; Now.X.BytesRead += rAmt;}
397  if (!(Cache->Ref(cBuff, (isFIS ? rAmt : 0)))) {doPR = 0; break;}
398  segNum++; segOff = 0;
399  if ((rLeft -= rAmt) <= 0) break;
400  rAmt = (rLeft <= SegSize ? rLeft : SegSize);
401  }
402 
403 // Update stats
404 //
405  Statistics.Add(Now);
406 
407 // See if a preread needs to be done. We will only do this if no errors occurred
408 //
409  if (doPR && cBuff)
410  {EnforceMrSw.UnLock();
411  QueuePR(segNum, rLen, prLRU, 1);
412  }
413 
414 // All done, if we ended fine, return amount read. If there is no page buffer
415 // then the cache returned the error in the amount present variable.
416 //
417  if (Debug > 1) std::cerr <<"Rdr: ret " <<(cBuff ? Dest-Buff : rGot) <<" hits "
418  <<Now.X.Hits <<" pr " <<Now.X.HitsPR <<std::endl;
419  return (cBuff ? Dest-Buff : rGot);
420 }
int Read(char *Buffer, long long Offset, int Length)
Definition: XrdRmcData.cc:337

References XrdOucCacheStats::Add(), XrdOucCacheStats::CacheStats::BytesGet, XrdOucCacheStats::CacheStats::BytesRead, XrdOucCacheStats::CacheStats::Hits, XrdOucCacheStats::CacheStats::HitsPR, XrdSysMutex::Lock(), XrdOucCacheStats::CacheStats::Miss, XrdOucCacheIO::aprParms::Trigger, XrdSysMutex::UnLock(), and XrdOucCacheStats::X.

+ Here is the call graph for this function:

◆ setAPR()

int XrdRmcData::setAPR ( aprParms Dest,
aprParms Src,
int  pSize 
)
static

Definition at line 489 of file XrdRmcData.cc.

490 {
491 
492 // Copy over the information
493 //
494  Dest = Src;
495 
496 // Fix it up as needed
497 //
498  if (Dest.Trigger <= 0) Dest.Trigger = (Dest.minPages ? pSize + 1: 0);
499  if (Dest.prRecalc <= 0) Dest.prRecalc = (Dest.prRecalc ? 52428800 : 0);
500  if (Dest.minPages < 0) Dest.minPages = 0;
501  if (Dest.minPerf < 0) Dest.minPerf = 0;
502  if (Dest.minPerf >100) Dest.minPerf = 100;
503 
504 
505 // Indicate whether anything can be preread
506 //
507  return (Dest.minPages > 0 && Dest.Trigger > 1);
508 }

References XrdOucCacheIO::aprParms::minPages, XrdOucCacheIO::aprParms::minPerf, XrdOucCacheIO::aprParms::prRecalc, and XrdOucCacheIO::aprParms::Trigger.

Referenced by XrdRmcData(), XrdRmcReal::XrdRmcReal(), and Preread().

+ Here is the caller graph for this function:

◆ Sync()

int XrdRmcData::Sync ( )
inlinevirtual

Perform an synchronous sync() operation.

Returns
<0 - Sync failed, value is -errno. =0 - Sync succeeded.

Implements XrdOucCacheIO.

Definition at line 62 of file XrdRmcData.hh.

62 {return 0;} // We only support write-through for now

◆ Trunc()

int XrdRmcData::Trunc ( long long  offs)
virtual

Perform an synchronous trunc() operation.

Parameters
offsthe size the file is have.
Returns
<0 - Trunc failed, value is -errno. =0 - Trunc succeeded.

Implements XrdOucCacheIO.

Definition at line 514 of file XrdRmcData.cc.

515 {
516  MrSw EnforceMrSw(wPLock, xs_Exclusive);
517 
518 // Verify that we can modify this cache and the trunc offset
519 //
520  if (!isRW) return -EROFS;
521  if (Offs > XrdRmcReal::MaxFO || Offs < 0) return -EOVERFLOW;
522 
523 // Get the segment pointer and truncate pages from the cache
524 //
525  Cache->Trunc(ioObj, (Offs >> SegShft) | VNum);
526 
527 // Now just return the result of actually doing the truncate
528 //
529  return ioObj->Trunc(Offs);
530 }
virtual int Trunc(long long offs)=0

References XrdOucCacheIO::Trunc(), and xs_Exclusive.

+ Here is the call graph for this function:

◆ Write()

int XrdRmcData::Write ( char *  buff,
long long  offs,
int  wlen 
)
virtual

Perform an synchronous write.

Parameters
buffpointer to the buffer holding the contents. The buffer must remain valid until the callback is invoked.
offsthe offset into the file.
wlenthe number of bytes to write
Returns
< 0 - Write failed, value is -errno. >=0 - Write succeeded, value is number of bytes written.

Implements XrdOucCacheIO.

Definition at line 536 of file XrdRmcData.cc.

537 {
538  MrSw EnforceMrSw(wPLock, xs_Exclusive);
539  XrdOucCacheStats Now;
540  char *cBuff, *Src = Buff;
541  long long segOff, segNum;
542  int noIO, wAmt, rGot, wLeft = wLen;
543 
544 // Verify write length, ability, and buffer
545 //
546  if (wLen <= 0) return 0;
547  if (!isRW) return -EROFS;
548  if (!Buff) return -EINVAL;
549  if (XrdRmcReal::MaxFO < Offs || Offs < 0
550  || XrdRmcReal::MaxFO < (Offs + wLen)) return -EOVERFLOW;
551 
552 // First step is to write out all the data (write-through for now)
553 //
554  if ((wAmt = ioObj->Write(Buff, Offs, wLen)) != wLen)
555  return (wAmt < 0 ? wAmt : -EIO);
556  Now.X.BytesWrite = wLen;
557 
558 // Get the segment pointer, offset and the initial write amount
559 //
560  segNum = (Offs >> SegShft) | VNum;
561  segOff = Offs & OffMask;
562  wAmt = SegSize - segOff;
563  if (wAmt > wLen) wAmt = wLen;
564 
565 // Now update any pages that are actually in the cache
566 //
567 do{if (!(cBuff = Cache->Get(0, segNum, rGot, noIO))) Now.X.Miss++;
568  else {memcpy(cBuff+segOff, Src, wAmt);
569  Now.X.BytesPut += wAmt; Now.X.Hits++;
570  if (noIO < 0) Now.X.HitsPR++;
571  Cache->Upd(cBuff, wAmt, segOff);
572  }
573  Src += wAmt;
574  if ((wLeft -= wAmt) <= 0) break;
575  wAmt = (wLeft <= SegSize ? wLeft : SegSize);
576  segNum++; segOff = 0;
577  } while(1);
578 
579 // Update stats and return how much we wrote
580 //
581  Statistics.Add(Now);
582  return wLen;
583 }
virtual int Write(char *buff, long long offs, int wlen)=0

References XrdOucCacheStats::CacheStats::BytesPut, XrdOucCacheStats::CacheStats::BytesWrite, XrdOucCacheStats::CacheStats::Hits, XrdOucCacheStats::CacheStats::HitsPR, XrdOucCacheStats::CacheStats::Miss, XrdOucCacheIO::Write(), XrdOucCacheStats::X, and xs_Exclusive.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: