XrdXrootdAioReq Class Reference

#include <XrdXrootdAio.hh>

Inheritance diagram for XrdXrootdAioReq:

XrdJob List of all members.

Public Member Functions

void DoIt ()
XrdXrootdAio * getAio ()
XrdXrootdAio * Pop ()
void Push (XrdXrootdAio *newp)
int Read ()
void Recycle (int deref=1, XrdXrootdAio *aiop=0)
int Write (XrdXrootdAio *aiop)
 XrdXrootdAioReq ()
 ~XrdXrootdAioReq ()

Static Public Member Functions

static XrdXrootdAioReq * Alloc (XrdXrootdProtocol *p, char iot, int numaio=0)
static void Init (int iosize, int maxaiopr, int maxaio=-80)

Private Member Functions

void Clear (XrdLink *lnkp)
void endRead ()
void endWrite ()
void Lock ()
void Scuttle (const char *opname)
void sendError (char *tident)
void UnLock ()

Static Private Member Functions

static XrdXrootdAioReq * addBlock ()

Private Attributes

XrdSysMutex aioMutex
XrdXrootdAioReq * Next
off_t myOffset
int myIOLen
unsigned int Instance
XrdLink * Link
XrdXrootdFile * myFile
XrdXrootdAio * aioDone
XrdXrootdAio * aioFree
int numActive
int aioTotal
int aioError
char aioType
char respDone
char isLocked
char reDrive
XrdXrootdResponse Response

Static Private Attributes

static const char * TraceID
static XrdSysError * eDest
static XrdSysMutex rqMutex
static XrdXrootdAioReq * rqFirst
static int QuantumMin
static int Quantum
static int QuantumMax
static int maxAioPR
static int maxAioPR2

Friends

class XrdXrootdAio

Detailed Description

Definition at line 80 of file XrdXrootdAio.hh.


Constructor & Destructor Documentation

XrdXrootdAioReq::XrdXrootdAioReq (  )  [inline]

Definition at line 108 of file XrdXrootdAio.hh.

Referenced by addBlock().

XrdXrootdAioReq::~XrdXrootdAioReq (  )  [inline]

Definition at line 109 of file XrdXrootdAio.hh.


Member Function Documentation

XrdXrootdAioReq * XrdXrootdAioReq::Alloc ( XrdXrootdProtocol *  p,
char  iot,
int  numaio = 0 
) [static]

Definition at line 222 of file XrdXrootdAio.cc.

References addBlock(), XrdXrootdAio::Alloc(), Clear(), i, XrdLink::Inst(), XrdXrootdProtocol::Link, XrdSysMutex::Lock(), maxAioPR, maxAioPR2, XrdXrootdProtocol::myFile, XrdXrootdProtocol::myIOLen, XrdXrootdProtocol::myOffset, Next, XrdXrootdAio::Next, Quantum, QuantumMax, QuantumMin, XrdXrootdAio::Recycle(), XrdXrootdProtocol::Response, rqFirst, rqMutex, XrdLink::setRef(), and XrdSysMutex::UnLock().

Referenced by XrdXrootdProtocol::aio_Read(), and XrdXrootdProtocol::aio_Write().

void XrdXrootdAioReq::DoIt (  )  [inline, virtual]

Implements XrdJob.

Definition at line 87 of file XrdXrootdAio.hh.

References aioType, endRead(), and endWrite().

XrdXrootdAio * XrdXrootdAioReq::getAio (  ) 

Definition at line 290 of file XrdXrootdAio.cc.

References aioFree, Lock(), XrdXrootdAio::Next, reDrive, and UnLock().

Referenced by XrdXrootdProtocol::aio_WriteAll().

XrdXrootdAio* XrdXrootdAioReq::Pop (  )  [inline]

Definition at line 93 of file XrdXrootdAio.hh.

References aioDone, and XrdXrootdAio::Next.

Referenced by XrdXrootdProtocol::aio_WriteCont().

void XrdXrootdAioReq::Push ( XrdXrootdAio *  newp  )  [inline]

Definition at line 97 of file XrdXrootdAio.hh.

References aioDone, and XrdXrootdAio::Next.

Referenced by XrdXrootdProtocol::aio_WriteAll().

void XrdXrootdAioReq::Init ( int  iosize,
int  maxaiopr,
int  maxaio = -80 
) [static]

Definition at line 310 of file XrdXrootdAio.cc.

References addBlock(), XrdXrootdAio::addBlock(), XrdXrootdAio::BPool, XrdXrootdProtocol::BPool, Clear(), DEBUG, eDest, XrdXrootdProtocol::eDest, XrdXrootdAio::maxAio, maxAioPR, maxAioPR2, XrdXrootdProtocol::maxBuffsz, Quantum, QuantumMax, QuantumMin, XrdXrootdAio::Recycle(), Recycle(), XrdXrootdProtocol::Sched, XrdXrootdAio::Sched, XrdXrootdAio::SI, XrdXrootdProtocol::SI, and TRACE.

Referenced by XrdXrootdProtocol::Configure().

int XrdXrootdAioReq::Read (  ) 

Definition at line 355 of file XrdXrootdAio.cc.

References aiocb::aio_nbytes, aiocb::aio_offset, aioFree, XrdBuffer::bsize, XrdXrootdAio::buffp, ENOBUFS, myFile, myIOLen, myOffset, XrdXrootdAio::Next, numActive, XrdSfsFile::read(), Recycle(), XrdSfsAio::sfsAio, and XrdXrootdFile::XrdSfsp.

Referenced by XrdXrootdProtocol::aio_Read(), and endRead().

void XrdXrootdAioReq::Recycle ( int  deref = 1,
XrdXrootdAio *  aiop = 0 
)

Definition at line 394 of file XrdXrootdAio.cc.

References aioDone, aioError, aioFree, aioType, isLocked, Link, XrdSysMutex::Lock(), Lock(), Next, XrdXrootdAio::Next, numActive, XrdXrootdAio::Recycle(), respDone, rqFirst, rqMutex, XrdLink::setRef(), XrdSysMutex::UnLock(), and UnLock().

Referenced by XrdXrootdProtocol::aio_WriteAll(), endRead(), endWrite(), Init(), XrdXrootdProtocol::Process(), Read(), Scuttle(), and Write().

int XrdXrootdAioReq::Write ( XrdXrootdAio *  aiop  ) 

Definition at line 442 of file XrdXrootdAio.cc.

References Lock(), myFile, numActive, Recycle(), UnLock(), XrdSfsFile::write(), and XrdXrootdFile::XrdSfsp.

Referenced by XrdXrootdProtocol::aio_WriteAll(), and XrdXrootdProtocol::aio_WriteCont().

void XrdXrootdAioReq::Clear ( XrdLink *  lnkp  )  [private]

Definition at line 491 of file XrdXrootdAio.cc.

References aioDone, aioError, aioFree, aioTotal, aioType, Instance, isLocked, Link, myFile, myIOLen, myOffset, Next, numActive, reDrive, and respDone.

Referenced by Alloc(), and Init().

XrdXrootdAioReq * XrdXrootdAioReq::addBlock (  )  [static, private]

Definition at line 472 of file XrdXrootdAio.cc.

References DEBUG, i, Next, rqFirst, TRACE, and XrdXrootdAioReq().

Referenced by Alloc(), and Init().

void XrdXrootdAioReq::endRead (  )  [private]

Definition at line 514 of file XrdXrootdAio.cc.

References aioDone, aioError, aioFree, aioTotal, XrdBuffer::bsize, XrdBuffer::buff, XrdXrootdAio::buffp, Instance, XrdLink::isInstance(), kXR_oksofar, Link, Lock(), myFile, myIOLen, XrdXrootdAio::Next, numActive, Read(), XrdXrootdFile::readCnt, Recycle(), respDone, Response, XrdSfsAio::Result, Scuttle(), XrdXrootdResponse::Send(), sendError(), XrdSfsAio::TIdent, and UnLock().

Referenced by DoIt().

void XrdXrootdAioReq::endWrite (  )  [private]

Definition at line 571 of file XrdXrootdAio.cc.

References aioError, aioTotal, XrdLink::ID, Instance, XrdLink::isInstance(), Link, myFile, Recycle(), Response, Scuttle(), XrdXrootdResponse::Send(), sendError(), and XrdXrootdFile::writeCnt.

Referenced by DoIt().

void XrdXrootdAioReq::Lock (  )  [inline, private]

Definition at line 118 of file XrdXrootdAio.hh.

References aioMutex, isLocked, and XrdSysMutex::Lock().

Referenced by XrdXrootdAio::doneWrite(), endRead(), getAio(), Recycle(), and Write().

void XrdXrootdAioReq::Scuttle ( const char *  opname  )  [private]

Definition at line 600 of file XrdXrootdAio.cc.

References eDest, XrdSysError::Emsg(), XrdLink::ID, Link, and Recycle().

Referenced by endRead(), and endWrite().

void XrdXrootdAioReq::sendError ( char *  tident  )  [private]

Definition at line 619 of file XrdXrootdAio.cc.

References aioError, aioType, XrdSysError::ec2text(), eDest, XrdSysError::Emsg(), XrdSfsFile::FName(), XrdXrootdProtocol::mapError(), myFile, respDone, Response, XrdXrootdResponse::Send(), snprintf, and XrdXrootdFile::XrdSfsp.

Referenced by endRead(), and endWrite().

void XrdXrootdAioReq::UnLock ( void   )  [inline, private]

Definition at line 121 of file XrdXrootdAio.hh.

References aioMutex, isLocked, and XrdSysMutex::UnLock().

Referenced by XrdXrootdAio::doneWrite(), endRead(), getAio(), Recycle(), and Write().


Friends And Related Function Documentation

friend class XrdXrootdAio [friend]

Definition at line 82 of file XrdXrootdAio.hh.


Member Data Documentation

const char * XrdXrootdAioReq::TraceID [static, private]

Definition at line 123 of file XrdXrootdAio.hh.

XrdSysError * XrdXrootdAioReq::eDest [static, private]

Definition at line 124 of file XrdXrootdAio.hh.

Referenced by Init(), Scuttle(), and sendError().

XrdSysMutex XrdXrootdAioReq::rqMutex [static, private]

Definition at line 125 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Recycle().

XrdXrootdAioReq * XrdXrootdAioReq::rqFirst [static, private]

Definition at line 126 of file XrdXrootdAio.hh.

Referenced by addBlock(), Alloc(), and Recycle().

int XrdXrootdAioReq::QuantumMin [static, private]

Definition at line 127 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Init().

int XrdXrootdAioReq::Quantum [static, private]

Definition at line 128 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Init().

int XrdXrootdAioReq::QuantumMax [static, private]

Definition at line 129 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Init().

int XrdXrootdAioReq::maxAioPR [static, private]

Definition at line 130 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Init().

int XrdXrootdAioReq::maxAioPR2 [static, private]

Definition at line 131 of file XrdXrootdAio.hh.

Referenced by Alloc(), and Init().

XrdSysMutex XrdXrootdAioReq::aioMutex [private]

Definition at line 133 of file XrdXrootdAio.hh.

Referenced by Lock(), and UnLock().

XrdXrootdAioReq* XrdXrootdAioReq::Next [private]

Definition at line 134 of file XrdXrootdAio.hh.

Referenced by addBlock(), Alloc(), Clear(), and Recycle().

off_t XrdXrootdAioReq::myOffset [private]

Definition at line 136 of file XrdXrootdAio.hh.

Referenced by Clear(), and Read().

int XrdXrootdAioReq::myIOLen [private]

Definition at line 137 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneWrite(), endRead(), and Read().

unsigned int XrdXrootdAioReq::Instance [private]

Definition at line 138 of file XrdXrootdAio.hh.

Referenced by Clear(), endRead(), and endWrite().

XrdLink* XrdXrootdAioReq::Link [private]

Definition at line 139 of file XrdXrootdAio.hh.

Referenced by XrdXrootdAio::Alloc(), Clear(), XrdXrootdAio::doneWrite(), endRead(), endWrite(), Recycle(), and Scuttle().

XrdXrootdFile* XrdXrootdAioReq::myFile [private]

Definition at line 140 of file XrdXrootdAio.hh.

Referenced by Clear(), endRead(), endWrite(), Read(), sendError(), and Write().

XrdXrootdAio* XrdXrootdAioReq::aioDone [private]

Definition at line 142 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneRead(), endRead(), Pop(), Push(), and Recycle().

XrdXrootdAio* XrdXrootdAioReq::aioFree [private]

Definition at line 143 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneWrite(), endRead(), getAio(), Read(), and Recycle().

int XrdXrootdAioReq::numActive [private]

Definition at line 144 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneWrite(), endRead(), Read(), Recycle(), and Write().

int XrdXrootdAioReq::aioTotal [private]

Definition at line 145 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), endRead(), and endWrite().

int XrdXrootdAioReq::aioError [private]

Definition at line 146 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), endRead(), endWrite(), Recycle(), and sendError().

char XrdXrootdAioReq::aioType [private]

Definition at line 147 of file XrdXrootdAio.hh.

Referenced by Clear(), DoIt(), Recycle(), and sendError().

char XrdXrootdAioReq::respDone [private]

Definition at line 148 of file XrdXrootdAio.hh.

Referenced by Clear(), endRead(), Recycle(), and sendError().

char XrdXrootdAioReq::isLocked [private]

Definition at line 149 of file XrdXrootdAio.hh.

Referenced by Clear(), Lock(), Recycle(), and UnLock().

char XrdXrootdAioReq::reDrive [private]

Definition at line 150 of file XrdXrootdAio.hh.

Referenced by Clear(), XrdXrootdAio::doneWrite(), and getAio().

XrdXrootdResponse XrdXrootdAioReq::Response [private]

Definition at line 152 of file XrdXrootdAio.hh.

Referenced by endRead(), endWrite(), and sendError().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:50:47 2011 for ROOT_528-00b_version by  doxygen 1.5.1