XRootD
Loading...
Searching...
No Matches
XrdSsiFileSess Class Reference

#include <XrdSsiFileSess.hh>

+ Collaboration diagram for XrdSsiFileSess:

Public Member Functions

bool AttnInfo (XrdOucErrInfo &eInfo, const XrdSsiRespInfo *respP, unsigned int reqID)
 
int close (bool viaDel=false)
 
XrdOucErrInfoerrInfo ()
 
int fctl (const int cmd, int alen, const char *args, const XrdSecEntity *client)
 
const char * FName ()
 
int open (const char *fileName, XrdOucEnv &theEnv, XrdSfsFileOpenMode openMode)
 
XrdSfsXferSize read (XrdSfsFileOffset fileOffset, char *buffer, XrdSfsXferSize buffer_size)
 
void Recycle ()
 
XrdSsiFileResourceResource ()
 
int SendData (XrdSfsDio *sfDio, XrdSfsFileOffset offset, XrdSfsXferSize size)
 
void setXio (XrdSfsXio *xP)
 
int truncate (XrdSfsFileOffset fileOffset)
 
XrdSfsXferSize write (XrdSfsFileOffset fileOffset, const char *buffer, XrdSfsXferSize buffer_size)
 

Static Public Member Functions

static XrdSsiFileSessAlloc (XrdOucErrInfo &einfo, const char *user)
 
static void SetAuthDNS ()
 

Detailed Description

Definition at line 46 of file XrdSsiFileSess.hh.

Member Function Documentation

◆ Alloc()

XrdSsiFileSess * XrdSsiFileSess::Alloc ( XrdOucErrInfo einfo,
const char *  user 
)
static

Definition at line 126 of file XrdSsiFileSess.cc.

127{
128 XrdSsiFileSess *fsP;
129
130// Get a lock
131//
132 arMutex.Lock();
133
134// Get either a reuseable object or a new one
135//
136 if ((fsP = freeList))
137 {freeNum--;
138 freeList = fsP->nextFree;
139 arMutex.UnLock();
140 fsP->Init(einfo, user, true);
141 } else {
142 freeNew++;
143 if (freeMax <= freeAbs && freeNew >= freeMax/2)
144 {freeMax += freeMax/2;
145 freeNew = 0;
146 }
147 arMutex.UnLock();
148 fsP = new XrdSsiFileSess(einfo, user);
149 }
150
151// Return the object
152//
153 return fsP;
154}

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

Referenced by XrdSsiFile::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AttnInfo()

bool XrdSsiFileSess::AttnInfo ( XrdOucErrInfo eInfo,
const XrdSsiRespInfo respP,
unsigned int  reqID 
)

Definition at line 160 of file XrdSsiFileSess.cc.

163{
164 EPNAME("AttnInfo");
165 struct AttnResp {struct iovec ioV[4]; XrdSsiRRInfoAttn aHdr;};
166
167 AttnResp *attnResp;
168 char *mBuff;
169 int n, ioN = 2;
170 bool doFin;
171
172// If there is no data we can send back to the client in the attn response,
173// then simply reply with a short message to make the client come back.
174//
175 if (!respP->mdlen)
176 {if (respP->rType != XrdSsiRespInfo::isData
177 || respP->blen > XrdSsiResponder::MaxDirectXfr)
178 {eInfo.setErrInfo(0, "");
179 return false;
180 }
181 }
182
183// We will be constructing the response in the message buffer. This is
184// gauranteed to be big enough for our purposes so no need to check the size.
185//
186 mBuff = eInfo.getMsgBuff(n);
187
188// Initialize the response
189//
190 attnResp = (AttnResp *)mBuff;
191 memset(attnResp, 0, sizeof(AttnResp));
192 attnResp->aHdr.pfxLen = htons(sizeof(XrdSsiRRInfoAttn));
193
194// Fill out iovec to point to our header
195//
196//?attnResp->ioV[0].iov_len = sizeof(XrdSsiRRInfoAttn) + respP->mdlen;
197 attnResp->ioV[1].iov_base = mBuff+offsetof(struct AttnResp, aHdr);
198 attnResp->ioV[1].iov_len = sizeof(XrdSsiRRInfoAttn);
199
200// Fill out the iovec for the metadata if we have some
201//
202 if (respP->mdlen)
203 {attnResp->ioV[2].iov_base = (void *)respP->mdata;
204 attnResp->ioV[2].iov_len = respP->mdlen; ioN = 3;
205 attnResp->aHdr.mdLen = htonl(respP->mdlen);
207 if (QTRACE(Debug))
208 {char hexBuff[16],dotBuff[4];
209 DEBUG(reqID <<':' <<gigID <<' ' <<respP->mdlen <<" byte metadata (0x"
210 <<DUMPIT(respP->mdata,respP->mdlen) <<") sent.");
211 }
212 }
213
214// Check if we have actual data here as well and can send it along
215//
216 if (respP->rType == XrdSsiRespInfo::isData
217 && respP->blen+respP->mdlen <= XrdSsiResponder::MaxDirectXfr)
218 {if (respP->blen)
219 {attnResp->ioV[ioN].iov_base = (void *)respP->buff;
220 attnResp->ioV[ioN].iov_len = respP->blen; ioN++;
221 }
222 attnResp->aHdr.tag = XrdSsiRRInfoAttn::fullResp; doFin = true;
223 }
224 else {attnResp->aHdr.tag = XrdSsiRRInfoAttn::pendResp; doFin = false;}
225
226// If we sent the full response we must remove the request from the request
227// table as it will get finished off when the response is actually sent.
228//
229 if (doFin) rTab.Del(reqID, false);
230
231// Setup to have metadata actually sent to the requestor
232//
233 eInfo.setErrCode(ioN);
234 return doFin;
235}
#define DEBUG(x)
#define EPNAME(x)
#define QTRACE(act)
bool Debug
#define DUMPIT(x, y)
char * getMsgBuff(int &mblen)
int setErrInfo(int code, const char *emsg)
int setErrCode(int code)
void Bump(int &val)
void Del(uint64_t itemID, bool finit=false)
static const int MaxDirectXfr
long long RspMDBytes
XrdSsiStats Stats
static const int fullResp
static const int pendResp
int mdlen
Metadata length.
const char * mdata
-> Metadata about response.

References XrdOucStats::Bump(), DEBUG, Debug, XrdSsiRRTable< T >::Del(), DUMPIT, EPNAME, XrdSsiRRInfoAttn::fullResp, XrdOucErrInfo::getMsgBuff(), XrdSsiRespInfo::isData, XrdSsiResponder::MaxDirectXfr, XrdSsiRespInfo::mdata, XrdSsiRespInfo::mdlen, XrdSsiRRInfoAttn::pendResp, QTRACE, XrdSsiStats::RspMDBytes, XrdSsiRespInfo::rType, XrdOucErrInfo::setErrCode(), XrdOucErrInfo::setErrInfo(), and XrdSsi::Stats.

Referenced by XrdSsiFileReq::WantResponse().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ close()

int XrdSsiFileSess::close ( bool  viaDel = false)

Definition at line 241 of file XrdSsiFileSess.cc.

249{
250 const char *epname = "close";
251
252// Do some debugging
253//
254 DEBUG((gigID ? gigID : "???") <<" del=" <<viaDel);
255
256// Collect statistics if this is a delete which implies a lost connection
257//
258 if (viaDel)
259 {int rCnt = rTab.Num();
260 if (rCnt) Stats.Bump(Stats.ReqFinForce, rCnt);
261 }
262
263// Run through all outstanding requests and comlete them
264//
265 rTab.Reset();
266
267// Free any in-progress buffers
268//
269 if (inProg)
270 {if (oucBuff) {oucBuff->Recycle(); oucBuff = 0;}
271 inProg = false;
272 }
273
274// Clean up storage
275//
276 isOpen = false;
277 return SFS_OK;
278}
#define SFS_OK
void Recycle()
Recycle the buffer. The buffer may be reused in the future.

References XrdOucStats::Bump(), DEBUG, XrdSsiRRTable< T >::Num(), XrdOucBuffer::Recycle(), XrdSsiStats::ReqFinForce, XrdSsiRRTable< T >::Reset(), SFS_OK, and XrdSsi::Stats.

Referenced by XrdSsiFile::close().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ errInfo()

XrdOucErrInfo * XrdSsiFileSess::errInfo ( )
inline

Definition at line 56 of file XrdSsiFileSess.hh.

56{return eInfo;}

Referenced by XrdSsiFileReq::Done(), and open().

+ Here is the caller graph for this function:

◆ fctl()

int XrdSsiFileSess::fctl ( const int  cmd,
int  alen,
const char *  args,
const XrdSecEntity client 
)

Definition at line 284 of file XrdSsiFileSess.cc.

288{
289 static const char *epname = "fctl";
290 XrdSsiRRInfo *rInfo;
291 XrdSsiFileReq *rqstP;
292 unsigned int reqID;
293
294// If this isn't the special query, then return an error
295//
296 if (cmd != SFS_FCTL_SPEC1)
297 return XrdSsiUtils::Emsg(epname, ENOTSUP, "fctl", gigID, *eInfo);
298
299// Caller wishes to find out if a request is ready and wait if it is not
300//
301 if (!args || alen < (int)sizeof(XrdSsiRRInfo))
302 return XrdSsiUtils::Emsg(epname, EINVAL, "fctl", gigID, *eInfo);
303
304// Grab the request identifier
305//
306 rInfo = (XrdSsiRRInfo *)args;
307 reqID = rInfo->Id();
308
309// Do some debugging
310//
311 DEBUG(reqID <<':' <<gigID <<" query resp status");
312
313// Find the request
314//
315 if (!(rqstP = rTab.LookUp(reqID)))
316 return XrdSsiUtils::Emsg(epname, ESRCH, "fctl", gigID, *eInfo);
317
318// Check if a response is waiting for the caller
319//
320 if (rqstP->WantResponse(*eInfo))
321 {DEBUG(reqID <<':' <<gigID <<" resp ready");
323 return SFS_DATAVEC;
324 }
325
326// Put this client into callback state
327//
328 DEBUG(reqID <<':' <<gigID <<" resp not ready");
329 eInfo->setErrCB((XrdOucEICB *)rqstP);
330 eInfo->setErrInfo(respWT, "");
332 return SFS_STARTED;
333}
#define SFS_DATAVEC
#define SFS_STARTED
#define SFS_FCTL_SPEC1
void setErrCB(XrdOucEICB *cb, unsigned long long cbarg=0)
bool WantResponse(XrdOucErrInfo &eInfo)
void Id(unsigned int id)
T * LookUp(uint64_t itemID)
static int Emsg(const char *pfx, int ecode, const char *op, const char *path, XrdOucErrInfo &eDest)

References XrdOucStats::Bump(), DEBUG, XrdSsiUtils::Emsg(), XrdSsiRRInfo::Id(), XrdSsiRRTable< T >::LookUp(), XrdSsi::respWT, XrdSsiStats::RspReady, XrdSsiStats::RspUnRdy, XrdOucErrInfo::setErrCB(), XrdOucErrInfo::setErrInfo(), SFS_DATAVEC, SFS_FCTL_SPEC1, SFS_STARTED, XrdSsi::Stats, and XrdSsiFileReq::WantResponse().

Referenced by XrdSsiFile::fctl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FName()

const char * XrdSsiFileSess::FName ( )
inline

Definition at line 65 of file XrdSsiFileSess.hh.

65{return gigID;}

Referenced by XrdSsiFile::fctl(), XrdSsiFile::FName(), XrdSsiFile::readv(), XrdSsiFile::sync(), and XrdSsiFile::sync().

+ Here is the caller graph for this function:

◆ open()

int XrdSsiFileSess::open ( const char *  fileName,
XrdOucEnv theEnv,
XrdSfsFileOpenMode  openMode 
)

Definition at line 388 of file XrdSsiFileSess.cc.

400{
401 static const char *epname = "open";
403 const char *eText;
404 int eNum;
405
406// Verify that this object is not already associated with an open file
407//
408 if (isOpen)
409 return XrdSsiUtils::Emsg(epname, EADDRINUSE, "open session", path, *eInfo);
410
411// Make sure the open flag is correct (we now open this R/O so don't check)
412//
413// if (open_mode != SFS_O_RDWR)
414// return XrdSsiUtils::Emsg(epname, EPROTOTYPE, "open session", path, *eInfo);
415
416// Setup the file resource object
417//
418 fileResource.Init(path, theEnv, authDNS);
419
420// Notify the provider that we will be executing a request
421//
422 if (Service->Prepare(errInfo, fileResource))
423 {const char *usr = fileResource.rUser.c_str();
424 if (!(*usr)) gigID = strdup(path);
425 else {char gBuff[2048];
426 snprintf(gBuff, sizeof(gBuff), "%s:%s", usr, path);
427 gigID = strdup(gBuff);
428 }
429 DEBUG(gigID <<" prepared.");
430 isOpen = true;
431 return SFS_OK;
432 }
433
434// Get error information
435//
436 eText = errInfo.Get(eNum).c_str();
437 if (!eNum)
438 {eNum = ENOMSG; eText = "Provider returned invalid prepare response.";}
439
440// Decode the error
441//
442 switch(eNum)
443 {case EAGAIN:
444 if (!eText || !(*eText)) break;
445 eNum = errInfo.GetArg();
446 DEBUG(path <<" --> " <<eText <<':' <<eNum);
447 eInfo->setErrInfo(eNum, eText);
449 return SFS_REDIRECT;
450 break;
451 case EBUSY:
452 eNum = errInfo.GetArg();
453 if (!eText || !(*eText)) eText = "Provider is busy.";
454 DEBUG(path <<" dly " <<eNum <<' ' <<eText);
455 if (eNum <= 0) eNum = 1;
456 eInfo->setErrInfo(eNum, eText);
458 return eNum;
459 break;
460 default:
461 if (!eText || !(*eText)) eText = XrdSysE2T(eNum);
462 DEBUG(path <<" err " <<eNum <<' ' <<eText);
463 eInfo->setErrInfo(eNum, eText);
465 return SFS_ERROR;
466 break;
467 };
468
469// Something is quite wrong here
470//
471 Log.Emsg(epname, "Provider redirect returned no target host name!");
472 eInfo->setErrInfo(ENOMSG, "Server logic error");
474 return SFS_ERROR;
475}
#define SFS_ERROR
#define SFS_REDIRECT
const char * XrdSysE2T(int errcode)
Definition XrdSysE2T.cc:104
void Init(const char *path, XrdOucEnv &envP, bool aDNS)
XrdOucErrInfo * errInfo()
std::string rUser
-> Name of the resource user (nil if anonymous)
virtual bool Prepare(XrdSsiErrInfo &eInfo, const XrdSsiResource &rDesc)
Prepare for processing subsequent resource request.
int Emsg(const char *esfx, int ecode, const char *text1, const char *text2=0)
XrdSsiService * Service
XrdSysError Log

References XrdOucStats::Bump(), DEBUG, XrdSysError::Emsg(), XrdSsiUtils::Emsg(), errInfo(), XrdSsiFileResource::Init(), XrdSsi::Log, XrdSsiService::Prepare(), XrdSsiStats::ReqPrepErrs, XrdSsiStats::ReqRedir, XrdSsiStats::ReqStalls, XrdSsiResource::rUser, XrdSsi::Service, XrdOucErrInfo::setErrInfo(), SFS_ERROR, SFS_OK, SFS_REDIRECT, XrdSsi::Stats, and XrdSysE2T().

Referenced by XrdSsiFile::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read()

XrdSfsXferSize XrdSsiFileSess::read ( XrdSfsFileOffset  fileOffset,
char *  buffer,
XrdSfsXferSize  buffer_size 
)

Definition at line 481 of file XrdSsiFileSess.cc.

495{
496 static const char *epname = "read";
497 XrdSsiRRInfo rInfo(offset);
498 XrdSsiFileReq *rqstP;
499 XrdSfsXferSize retval;
500 unsigned int reqID = rInfo.Id();
501 bool noMore = false;
502
503// Find the request object. If not there we may have encountered an eof
504//
505 if (!(rqstP = rTab.LookUp(reqID)))
506 {if (eofVec.IsSet(reqID))
507 {eofVec.UnSet(reqID);
508 return 0;
509 }
510 return XrdSsiUtils::Emsg(epname, ESRCH, "read", gigID, *eInfo);
511 }
512
513// Simply effect the read via the request object
514//
515 retval = rqstP->Read(noMore, buff, blen);
516
517// See if we just completed this request
518//
519 if (noMore)
520 {rqstP->Finalize();
521 rTab.Del(reqID);
522 eofVec.Set(reqID);
523 }
524
525// All done
526//
527 return retval;
528}
int XrdSfsXferSize
void Set(uint32_t bval)
Definition XrdSsiBVec.hh:39
bool IsSet(uint32_t bval)
Definition XrdSsiBVec.hh:44
void UnSet(uint32_t bval)
Definition XrdSsiBVec.hh:50
XrdSfsXferSize Read(bool &done, char *buffer, XrdSfsXferSize blen)

References XrdSsiRRTable< T >::Del(), XrdSsiUtils::Emsg(), XrdSsiFileReq::Finalize(), XrdSsiRRInfo::Id(), XrdSsiBVec::IsSet(), XrdSsiRRTable< T >::LookUp(), XrdSsiFileReq::Read(), XrdSsiBVec::Set(), and XrdSsiBVec::UnSet().

Referenced by XrdSsiFile::read(), and XrdSsiFile::read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Recycle()

void XrdSsiFileSess::Recycle ( )

Definition at line 534 of file XrdSsiFileSess.cc.

535{
536
537// Do an immediate reset on ourselves to avoid getting too many locks
538//
539 Reset();
540
541// Get a lock
542//
543 arMutex.Lock();
544
545// Check if we should place this on the free list or simply delete it
546//
547 if (freeNum < freeMax)
548 {nextFree = freeList;
549 freeList = this;
550 freeNum++;
551 arMutex.UnLock();
552 } else {
553 arMutex.UnLock();
554 delete this;
555 }
556}

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

Referenced by XrdSsiFile::~XrdSsiFile(), and XrdSsiFile::open().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Resource()

XrdSsiFileResource & XrdSsiFileSess::Resource ( )
inline

Definition at line 77 of file XrdSsiFileSess.hh.

77{return fileResource;}

◆ SendData()

int XrdSsiFileSess::SendData ( XrdSfsDio sfDio,
XrdSfsFileOffset  offset,
XrdSfsXferSize  size 
)

Definition at line 580 of file XrdSsiFileSess.cc.

583{
584 static const char *epname = "SendData";
585 XrdSsiRRInfo rInfo(offset);
586 XrdSsiFileReq *rqstP;
587 unsigned int reqID = rInfo.Id();
588 int rc;
589
590// Find the request object
591//
592 if (!(rqstP = rTab.LookUp(reqID)))
593 return XrdSsiUtils::Emsg(epname, ESRCH, "send", gigID, *eInfo);
594
595// Simply effect the send via the request object
596//
597 rc = rqstP->Send(sfDio, size);
598
599// Determine how this ended
600//
601 if (rc > 0) rc = SFS_OK;
602 else {rqstP->Finalize();
603 rTab.Del(reqID);
604 }
605 return rc;
606}
int Send(XrdSfsDio *sfDio, XrdSfsXferSize size)

References XrdSsiRRTable< T >::Del(), XrdSsiUtils::Emsg(), XrdSsiFileReq::Finalize(), XrdSsiRRInfo::Id(), XrdSsiRRTable< T >::LookUp(), XrdSsiFileReq::Send(), and SFS_OK.

Referenced by XrdSsiFile::SendData().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAuthDNS()

static void XrdSsiFileSess::SetAuthDNS ( )
inlinestatic

Definition at line 83 of file XrdSsiFileSess.hh.

83{authDNS = true;}

◆ setXio()

void XrdSsiFileSess::setXio ( XrdSfsXio xP)
inline

Definition at line 85 of file XrdSsiFileSess.hh.

85{xioP = xP;}

Referenced by XrdSsiFile::setXio().

+ Here is the caller graph for this function:

◆ truncate()

int XrdSsiFileSess::truncate ( XrdSfsFileOffset  fileOffset)

Definition at line 612 of file XrdSsiFileSess.cc.

620{
621 static const char *epname = "trunc";
622 XrdSsiFileReq *rqstP;
623 XrdSsiRRInfo rInfo(flen);
624 XrdSsiRRInfo::Opc reqXQ = rInfo.Cmd();
625 unsigned int reqID = rInfo.Id();
626
627// Find the request object. If not there we may have encountered an eof
628//
629 if (!(rqstP = rTab.LookUp(reqID)))
630 {if (eofVec.IsSet(reqID))
631 {eofVec.UnSet(reqID);
632 return 0;
633 }
634 return XrdSsiUtils::Emsg(epname, ESRCH, "cancel", gigID, *eInfo);
635 }
636
637// Process request (this can only be a cancel request)
638//
639 if (reqXQ != XrdSsiRRInfo::Can)
640 return XrdSsiUtils::Emsg(epname, ENOTSUP, "trunc", gigID, *eInfo);
641
642// Perform the cancellation
643//
644 DEBUG(reqID <<':' <<gigID <<" cancelled");
645 rqstP->Finalize();
646 rTab.Del(reqID);
647 return SFS_OK;
648}

References XrdSsiRRInfo::Can, XrdSsiRRInfo::Cmd(), DEBUG, XrdSsiRRTable< T >::Del(), XrdSsiUtils::Emsg(), XrdSsiFileReq::Finalize(), XrdSsiRRInfo::Id(), XrdSsiBVec::IsSet(), XrdSsiRRTable< T >::LookUp(), SFS_OK, and XrdSsiBVec::UnSet().

Referenced by XrdSsiFile::truncate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

XrdSfsXferSize XrdSsiFileSess::write ( XrdSfsFileOffset  fileOffset,
const char *  buffer,
XrdSfsXferSize  buffer_size 
)

Definition at line 654 of file XrdSsiFileSess.cc.

671{
672 static const char *epname = "write";
673 XrdSsiRRInfo rInfo(offset);
674 unsigned int reqID = rInfo.Id();
675 int reqPass;
676
677// Check if we are reading a request segment and handle that. This assumes that
678// writes to different requests cannot be interleaved (which they can't be).
679//
680 if (inProg) return writeAdd(buff, blen, reqID);
681
682// Make sure this request does not refer to an active request
683//
684 if (rTab.LookUp(reqID))
685 return XrdSsiUtils::Emsg(epname, EADDRINUSE, "write", gigID, *eInfo);
686
687// The offset contains the actual size of the request, make sure it's OK. Note
688// that it can be zero and by convention the blen must be one if so.
689//
690 reqPass = reqSize = rInfo.Size();
691 if (reqSize < blen)
692 {if (reqSize || blen != 1)
693 return XrdSsiUtils::Emsg(epname, EPROTO, "write", gigID, *eInfo);
694 reqSize = 1;
695 } else if (reqSize < 0 || reqSize > maxRSZ)
696 return XrdSsiUtils::Emsg(epname, EFBIG, "write", gigID, *eInfo);
697
698// Indicate we are in the progress of collecting the request arguments
699//
700 inProg = true;
701 eofVec.UnSet(reqID);
702
703// Do some debugging
704//
705 DEBUG(reqID <<':' <<gigID <<" rsz=" <<reqSize <<" wsz=" <<blen);
706
707// If the complete request is here then grab the buffer, transfer ownership to
708// the request object, and then activate it for processing.
709//
710 if (reqSize == blen && xioP)
711 {XrdSfsXioHandle bRef = xioP->Claim(buff, reqSize, minRSZ);
712 if (!bRef)
713 {if (errno) Log.Emsg(epname,"Xio.Claim() failed;",XrdSysE2T(errno));}
714 else {if (!NewRequest(reqID, 0, bRef, reqPass))
715 return XrdSsiUtils::Emsg(epname,ENOMEM,"write xio",gigID,*eInfo);
716 return blen;
717 }
718 }
719
720// The full request is not present, so get a buffer to piece it together
721//
722 if (!(oucBuff = BuffPool->Alloc(reqSize)))
723 return XrdSsiUtils::Emsg(epname, ENOMEM, "write alloc", gigID, *eInfo);
724
725// Setup to buffer this
726//
727 reqLeft = reqSize - blen;
728 memcpy(oucBuff->Data(), buff, blen);
729 if (!reqLeft)
730 {oucBuff->SetLen(reqSize);
731
732 if (!NewRequest(reqID, oucBuff, 0, reqPass))
733 return XrdSsiUtils::Emsg(epname, ENOMEM, "write sfs", gigID, *eInfo);
734 oucBuff = 0;
735 } else oucBuff->SetLen(blen, blen);
736 return blen;
737}
class XrdBuffer * XrdSfsXioHandle
Definition XrdSfsXio.hh:46
XrdOucBuffer * Alloc(int sz)
char * Data() const
void SetLen(int dataL, int dataO=0)
virtual XrdSfsXioHandle Claim(const char *curBuff, int datasz, int minasz)=0
XrdOucBuffPool * BuffPool

References XrdOucBuffPool::Alloc(), XrdSsi::BuffPool, XrdSfsXio::Claim(), XrdOucBuffer::Data(), DEBUG, XrdSysError::Emsg(), XrdSsiUtils::Emsg(), XrdSsiRRInfo::Id(), XrdSsi::Log, XrdSsiRRTable< T >::LookUp(), XrdSsi::maxRSZ, XrdSsi::minRSZ, XrdOucBuffer::SetLen(), XrdSsiRRInfo::Size(), XrdSsiBVec::UnSet(), and XrdSysE2T().

Referenced by XrdSsiFile::write(), and XrdSsiFile::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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