|
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 XrdXrootdProtocol::myIOLen, rqMutex, XrdSysMutex::Lock(), rqFirst, Next, addBlock(), XrdSysMutex::UnLock(), Clear(), XrdXrootdProtocol::Link, maxAioPR, Quantum, QuantumMin, maxAioPR2, QuantumMax, XrdXrootdAio::Alloc(), XrdXrootdAio::Next, aioFree, Recycle(), XrdLink::setRef(), Instance, XrdLink::Inst(), myIOLen, myOffset, XrdXrootdProtocol::myOffset, myFile, XrdXrootdProtocol::myFile, Response, XrdXrootdProtocol::Response, and aioType.
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 Lock(), numActive, Link, XrdLink::isInstance(), Instance, Scuttle(), aioDone, XrdXrootdAio::Next, aioError, myIOLen, XrdSfsAio::Result, XrdXrootdAio::buffp, XrdBuffer::bsize, Read(), sendError(), XrdSfsAio::TIdent, Recycle(), Response, XrdXrootdResponse::Send(), kXR_oksofar, XrdBuffer::buff, myFile, XrdXrootdFile::readCnt, aioTotal, aioFree, respDone, and UnLock().
Referenced by DoIt().
| void XrdXrootdAioReq::endWrite | ( | ) | [private] |
References Link, XrdLink::isInstance(), Instance, Scuttle(), aioError, sendError(), XrdLink::ID, Response, XrdXrootdResponse::Send(), myFile, XrdXrootdFile::writeCnt, aioTotal, and Recycle().
Referenced by DoIt().
| XrdXrootdAio * XrdXrootdAioReq::getAio | ( | ) |
References Lock(), aioFree, XrdXrootdAio::Next, reDrive, and UnLock().
Referenced by XrdXrootdProtocol::aio_WriteAll().
| void XrdXrootdAioReq::Init | ( | int | iosize, |
| int | maxaiopr, | ||
| int | maxaio = -80 |
||
| ) | [static] |
References XrdCms::Sched, eDest, Quantum, QuantumMin, QuantumMax, XrdXrootdProtocol::maxBuffsz, maxAioPR, maxAioPR2, TRACE, DEBUG, XrdXrootdAio::maxAio, addBlock(), Clear(), Recycle(), XrdXrootdAio::addBlock(), and XrdXrootdAio::Recycle().
Referenced by XrdXrootdProtocol::Configure().
| void XrdXrootdAioReq::Lock | ( | ) | [inline, private] |
References aioMutex, XrdSysMutex::Lock(), and isLocked.
Referenced by XrdXrootdAio::doneWrite(), getAio(), Recycle(), Write(), and endRead().
| XrdXrootdAio* XrdXrootdAioReq::Pop | ( | ) | [inline] |
References aioDone, and XrdXrootdAio::Next.
Referenced by XrdXrootdProtocol::aio_WriteCont().
| void XrdXrootdAioReq::Push | ( | XrdXrootdAio * | newp | ) | [inline] |
References XrdXrootdAio::Next, and aioDone.
Referenced by XrdXrootdProtocol::aio_WriteAll().
| int XrdXrootdAioReq::Read | ( | ) |
References aioFree, ENOBUFS, XrdXrootdAio::Next, XrdSfsAio::sfsAio, aiocb::aio_offset, myOffset, aiocb::aio_nbytes, XrdXrootdAio::buffp, XrdBuffer::bsize, myIOLen, numActive, myFile, XrdXrootdFile::XrdSfsp, XrdSfsFile::read(), and Recycle().
Referenced by endRead(), and XrdXrootdProtocol::aio_Read().
| void XrdXrootdAioReq::Recycle | ( | int | deref = 1, |
| XrdXrootdAio * | aiop = 0 |
||
| ) |
References XrdXrootdAio::Recycle(), Lock(), numActive, aioError, respDone, UnLock(), aioDone, XrdXrootdAio::Next, aioFree, Link, aioType, XrdLink::setRef(), isLocked, rqMutex, XrdSysMutex::Lock(), Next, rqFirst, and XrdSysMutex::UnLock().
Referenced by Alloc(), Init(), Read(), Write(), endRead(), endWrite(), Scuttle(), XrdXrootdProtocol::Process(), and XrdXrootdProtocol::aio_WriteAll().
| void XrdXrootdAioReq::Scuttle | ( | const char * | opname | ) | [private] |
References eDest, XrdSysError::Emsg(), Link, XrdLink::ID, and Recycle().
Referenced by endRead(), and endWrite().
| void XrdXrootdAioReq::sendError | ( | char * | tident | ) | [private] |
References respDone, snprintf, aioType, myFile, XrdXrootdFile::XrdSfsp, XrdSfsFile::FName(), eDest, XrdSysError::ec2text(), aioError, XrdSysError::Emsg(), XProtocol::mapError(), Response, and XrdXrootdResponse::Send().
Referenced by endRead(), and endWrite().
| void XrdXrootdAioReq::UnLock | ( | ) | [inline, private] |
References isLocked, aioMutex, and XrdSysMutex::UnLock().
Referenced by XrdXrootdAio::doneWrite(), getAio(), Recycle(), Write(), and endRead().
| int XrdXrootdAioReq::Write | ( | XrdXrootdAio * | aiop | ) |
References Lock(), numActive, UnLock(), myFile, XrdXrootdFile::XrdSfsp, XrdSfsFile::write(), and Recycle().
Referenced by XrdXrootdProtocol::aio_WriteAll(), and XrdXrootdProtocol::aio_WriteCont().
friend class XrdXrootdAio [friend] |
XrdXrootdAio* XrdXrootdAioReq::aioDone [private] |
int XrdXrootdAioReq::aioError [private] |
Referenced by XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), Recycle(), Clear(), endRead(), endWrite(), and sendError().
XrdXrootdAio* XrdXrootdAioReq::aioFree [private] |
XrdSysMutex XrdXrootdAioReq::aioMutex [private] |
int XrdXrootdAioReq::aioTotal [private] |
Referenced by XrdXrootdAio::doneRead(), XrdXrootdAio::doneWrite(), Clear(), endRead(), and endWrite().
char XrdXrootdAioReq::aioType [private] |
Referenced by Alloc(), Recycle(), Clear(), sendError(), and DoIt().
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(), XrdXrootdAio::doneWrite(), Recycle(), Clear(), endRead(), endWrite(), and Scuttle().
int XrdXrootdAioReq::maxAioPR = 8 [static, private] |
int XrdXrootdAioReq::maxAioPR2 = 16 [static, private] |
XrdXrootdFile* XrdXrootdAioReq::myFile [private] |
Referenced by Alloc(), Read(), Write(), Clear(), endRead(), endWrite(), and sendError().
int XrdXrootdAioReq::myIOLen [private] |
Referenced by XrdXrootdAio::doneWrite(), Alloc(), Read(), Clear(), and endRead().
off_t XrdXrootdAioReq::myOffset [private] |
XrdXrootdAioReq* XrdXrootdAioReq::Next [private] |
Referenced by Alloc(), Recycle(), addBlock(), and Clear().
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 XrdXrootdAio::doneWrite(), getAio(), and Clear().
char XrdXrootdAioReq::respDone [private] |
Referenced by Recycle(), Clear(), endRead(), and sendError().
XrdXrootdResponse XrdXrootdAioReq::Response [private] |
Referenced by Alloc(), endRead(), endWrite(), and sendError().
XrdXrootdAioReq * XrdXrootdAioReq::rqFirst = 0 [static, private] |
Referenced by Alloc(), Recycle(), and addBlock().
XrdSysMutex XrdXrootdAioReq::rqMutex [static, private] |
const char * XrdXrootdAioReq::TraceID = "AioReq" [static, private] |
1.7.5