xrootd
|
#include <XrdXrootdAio.hh>
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 = "AioReq" |
static XrdSysError * | eDest |
static XrdSysMutex | rqMutex |
static XrdXrootdAioReq * | rqFirst = 0 |
static int | QuantumMin |
static int | Quantum |
static int | QuantumMax |
static int | maxAioPR = 8 |
static int | maxAioPR2 = 16 |
Friends | |
class | XrdXrootdAio |
XrdXrootdAioReq::XrdXrootdAioReq | ( | ) | [inline] |
Referenced by addBlock().
XrdXrootdAioReq::~XrdXrootdAioReq | ( | ) | [inline] |
XrdXrootdAioReq * XrdXrootdAioReq::addBlock | ( | ) | [static, private] |
XrdXrootdAioReq * XrdXrootdAioReq::Alloc | ( | XrdXrootdProtocol * | p, |
char | iot, | ||
int | numaio = 0 |
||
) | [static] |
References addBlock(), aioFree, aioType, XrdXrootdAio::Alloc(), Clear(), XrdLink::Inst(), Instance, XrdXrootdProtocol::Link, XrdSysMutex::Lock(), maxAioPR, maxAioPR2, XrdXrootdProtocol::myFile, myFile, myIOLen, XrdXrootdProtocol::myIOLen, XrdXrootdProtocol::myOffset, myOffset, XrdXrootdAio::Next, Next, Quantum, QuantumMax, QuantumMin, Recycle(), XrdXrootdProtocol::Response, Response, rqFirst, rqMutex, XrdLink::setRef(), and XrdSysMutex::UnLock().
Referenced by XrdXrootdProtocol::aio_Read(), and XrdXrootdProtocol::aio_Write().
void XrdXrootdAioReq::Clear | ( | XrdLink * | lnkp | ) | [private] |
void XrdXrootdAioReq::DoIt | ( | ) | [inline, virtual] |
Implements XrdJob.
References aioType, endRead(), and endWrite().
void XrdXrootdAioReq::endRead | ( | ) | [private] |
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] |
References aioError, aioTotal, XrdLink::ID, Instance, XrdLink::isInstance(), Link, myFile, Recycle(), Response, Scuttle(), XrdXrootdResponse::Send(), sendError(), and XrdXrootdFile::writeCnt.
Referenced by DoIt().
XrdXrootdAio * XrdXrootdAioReq::getAio | ( | ) |
References aioFree, Lock(), XrdXrootdAio::Next, reDrive, and UnLock().
Referenced by XrdXrootdProtocol::aio_WriteAll().
void XrdXrootdAioReq::Init | ( | int | iosize, |
int | maxaiopr, | ||
int | maxaio = -80 |
||
) | [static] |
References XrdXrootdAio::addBlock(), addBlock(), XrdXrootdProtocol::BPool, Clear(), DEBUG, eDest, XrdXrootdAio::maxAio, maxAioPR, maxAioPR2, XrdXrootdProtocol::maxBuffsz, Quantum, QuantumMax, QuantumMin, XrdXrootdAio::Recycle(), Recycle(), XrdCms::Sched, XrdXrootdProtocol::SI, and TRACE.
Referenced by XrdXrootdProtocol::Configure().
void XrdXrootdAioReq::Lock | ( | ) | [inline, private] |
References aioMutex, isLocked, and XrdSysMutex::Lock().
Referenced by XrdXrootdAio::doneWrite(), endRead(), getAio(), Recycle(), and Write().
XrdXrootdAio* XrdXrootdAioReq::Pop | ( | ) | [inline] |
References aioDone, and XrdXrootdAio::Next.
Referenced by XrdXrootdProtocol::aio_WriteCont().
void XrdXrootdAioReq::Push | ( | XrdXrootdAio * | newp | ) | [inline] |
References aioDone, and XrdXrootdAio::Next.
Referenced by XrdXrootdProtocol::aio_WriteAll().
int XrdXrootdAioReq::Read | ( | ) |
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 |
||
) |
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(), Alloc(), endRead(), endWrite(), Init(), XrdXrootdProtocol::Process(), Read(), Scuttle(), and Write().
void XrdXrootdAioReq::Scuttle | ( | const char * | opname | ) | [private] |
References eDest, XrdSysError::Emsg(), XrdLink::ID, Link, and Recycle().
Referenced by endRead(), and endWrite().
void XrdXrootdAioReq::sendError | ( | char * | tident | ) | [private] |
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 | ( | ) | [inline, private] |
References aioMutex, isLocked, and XrdSysMutex::UnLock().
Referenced by XrdXrootdAio::doneWrite(), endRead(), getAio(), Recycle(), and Write().
int XrdXrootdAioReq::Write | ( | XrdXrootdAio * | aiop | ) |
References Lock(), myFile, numActive, Recycle(), UnLock(), XrdSfsFile::write(), and XrdXrootdFile::XrdSfsp.
Referenced by XrdXrootdProtocol::aio_WriteAll(), and XrdXrootdProtocol::aio_WriteCont().
friend class XrdXrootdAio [friend] |
XrdXrootdAio* XrdXrootdAioReq::aioDone [private] |
int XrdXrootdAioReq::aioError [private] |
Referenced by Clear(), XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), endRead(), endWrite(), Recycle(), and sendError().
XrdXrootdAio* XrdXrootdAioReq::aioFree [private] |
XrdSysMutex XrdXrootdAioReq::aioMutex [private] |
int XrdXrootdAioReq::aioTotal [private] |
Referenced by Clear(), XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), endRead(), and endWrite().
char XrdXrootdAioReq::aioType [private] |
Referenced by Alloc(), Clear(), DoIt(), Recycle(), and sendError().
XrdSysError * XrdXrootdAioReq::eDest [static, private] |
Referenced by Init(), Scuttle(), and sendError().
unsigned int XrdXrootdAioReq::Instance [private] |
Referenced by Alloc(), Clear(), endRead(), and endWrite().
char XrdXrootdAioReq::isLocked [private] |
XrdLink* XrdXrootdAioReq::Link [private] |
Referenced by XrdXrootdAio::Alloc(), Clear(), XrdXrootdAio::doneWrite(), endRead(), endWrite(), Recycle(), and Scuttle().
int XrdXrootdAioReq::maxAioPR = 8 [static, private] |
int XrdXrootdAioReq::maxAioPR2 = 16 [static, private] |
XrdXrootdFile* XrdXrootdAioReq::myFile [private] |
Referenced by Alloc(), Clear(), endRead(), endWrite(), Read(), sendError(), and Write().
int XrdXrootdAioReq::myIOLen [private] |
Referenced by Alloc(), Clear(), XrdXrootdAio::doneWrite(), endRead(), and Read().
off_t XrdXrootdAioReq::myOffset [private] |
XrdXrootdAioReq* XrdXrootdAioReq::Next [private] |
Referenced by addBlock(), Alloc(), Clear(), and Recycle().
int XrdXrootdAioReq::numActive [private] |
int XrdXrootdAioReq::Quantum [static, private] |
int XrdXrootdAioReq::QuantumMax [static, private] |
int XrdXrootdAioReq::QuantumMin [static, private] |
char XrdXrootdAioReq::reDrive [private] |
Referenced by Clear(), XrdXrootdAio::doneWrite(), and getAio().
char XrdXrootdAioReq::respDone [private] |
Referenced by Clear(), endRead(), Recycle(), and sendError().
XrdXrootdResponse XrdXrootdAioReq::Response [private] |
Referenced by Alloc(), endRead(), endWrite(), and sendError().
XrdXrootdAioReq * XrdXrootdAioReq::rqFirst = 0 [static, private] |
Referenced by addBlock(), Alloc(), and Recycle().
XrdSysMutex XrdXrootdAioReq::rqMutex [static, private] |
const char * XrdXrootdAioReq::TraceID = "AioReq" [static, private] |