#include <XrdOfsPoscq.hh>
Public Member Functions | |
int | Add (const char *Tident, const char *Lfn) |
int | Commit (const char *Lfn, int Offset) |
int | Del (const char *Lfn, int Offset, int Unlink=0) |
recEnt * | Init (int &Ok) |
int | Num () |
XrdOfsPoscq (XrdSysError *erp, XrdOss *oss, const char *fn) | |
~XrdOfsPoscq () | |
Static Public Member Functions | |
static recEnt * | List (XrdSysError *Say, const char *theFN) |
Static Public Attributes | |
static const int | ReqOffs = 64 |
static const int | ReqSize = sizeof(Request) |
Private Member Functions | |
void | FailIni (const char *lfn) |
int | reqRead (void *Buff, int Offs) |
int | reqWrite (void *Buff, int Bsz, int Offs) |
int | ReWrite (recEnt *rP) |
int | VerOffset (const char *Lfn, int Offset) |
Private Attributes | |
XrdSysMutex | myMutex |
XrdSysError * | eDest |
XrdOss * | ossFS |
FileSlot * | SlotList |
FileSlot * | SlotLust |
char * | pocFN |
int | pocSZ |
int | pocFD |
int | pocIQ |
Classes | |
struct | FileSlot |
struct | recEnt |
struct | Request |
Definition at line 20 of file XrdOfsPoscq.hh.
XrdOfsPoscq::XrdOfsPoscq | ( | XrdSysError * | erp, | |
XrdOss * | oss, | |||
const char * | fn | |||
) |
XrdOfsPoscq::~XrdOfsPoscq | ( | ) | [inline] |
Definition at line 58 of file XrdOfsPoscq.hh.
int XrdOfsPoscq::Add | ( | const char * | Tident, | |
const char * | Lfn | |||
) |
Definition at line 50 of file XrdOfsPoscq.cc.
References XrdOfsPoscq::Request::addT, eDest, XrdSysError::Emsg(), XrdOfsPoscq::Request::LFN, XrdSysMutex::Lock(), myMutex, XrdOfsPoscq::FileSlot::Next, XrdOfsPoscq::FileSlot::Offset, pocIQ, pocSZ, ReqSize, reqWrite(), XrdOfsPoscq::Request::Reserved, SlotList, SlotLust, strlcpy(), XrdSysMutex::UnLock(), and XrdOfsPoscq::Request::User.
Referenced by XrdOfsFile::open().
int XrdOfsPoscq::Commit | ( | const char * | Lfn, | |
int | Offset | |||
) |
Definition at line 92 of file XrdOfsPoscq.cc.
References eDest, XrdSysError::Emsg(), reqWrite(), and VerOffset().
Referenced by XrdOfsFile::open().
int XrdOfsPoscq::Del | ( | const char * | Lfn, | |
int | Offset, | |||
int | Unlink = 0 | |||
) |
Definition at line 111 of file XrdOfsPoscq.cc.
References eDest, XrdSysError::Emsg(), XrdSysMutex::Lock(), myMutex, XrdOfsPoscq::FileSlot::Next, XrdOfsPoscq::FileSlot::Offset, offsetof, ossFS, pocIQ, reqWrite(), SlotList, SlotLust, XrdOss::Unlink(), XrdSysMutex::UnLock(), and VerOffset().
Referenced by XrdOfsFile::close(), XrdOfs::ConfigPosc(), XrdOfsFile::open(), and XrdOfs::Unpersist().
XrdOfsPoscq::recEnt * XrdOfsPoscq::Init | ( | int & | Ok | ) |
Definition at line 155 of file XrdOfsPoscq.cc.
References eDest, XrdSysError::Emsg(), FailIni(), fstat, ftruncate, XrdOfsPoscq::Request::LFN, Mode, open, ossFS, pocFD, pocFN, pocSZ, pread, ReqOffs, ReqSize, ReWrite(), S_IAMB, S_IRGRP, S_IROTH, S_IRUSR, S_ISREG, S_IWUSR, XrdSysError::Say(), sprintf(), stat, and XrdOss::Stat().
Referenced by XrdOfs::ConfigPosc().
XrdOfsPoscq::recEnt * XrdOfsPoscq::List | ( | XrdSysError * | Say, | |
const char * | theFN | |||
) | [static] |
Definition at line 212 of file XrdOfsPoscq.cc.
References close, XrdSysError::Emsg(), fstat, XrdOfsPoscq::Request::LFN, open, pread, ReqOffs, ReqSize, XrdFrm::Say(), and stat.
int XrdOfsPoscq::Num | ( | ) | [inline] |
void XrdOfsPoscq::FailIni | ( | const char * | lfn | ) | [private] |
Definition at line 254 of file XrdOfsPoscq.cc.
References eDest, XrdSysError::Emsg(), and pocFN.
Referenced by Init().
int XrdOfsPoscq::reqRead | ( | void * | Buff, | |
int | Offs | |||
) | [private] |
int XrdOfsPoscq::reqWrite | ( | void * | Buff, | |
int | Bsz, | |||
int | Offs | |||
) | [private] |
int XrdOfsPoscq::ReWrite | ( | recEnt * | rP | ) | [private] |
Definition at line 279 of file XrdOfsPoscq.cc.
References close, eDest, XrdSysError::Emsg(), Mode, XrdOfsPoscq::recEnt::Next, XrdOfsPoscq::recEnt::Offset, open, pocFD, pocFN, pocSZ, rename, XrdOfsPoscq::recEnt::reqData, ReqOffs, ReqSize, reqWrite(), S_IRGRP, S_IROTH, S_IRUSR, S_IWUSR, strcat(), and strcpy().
Referenced by Init().
int XrdOfsPoscq::VerOffset | ( | const char * | Lfn, | |
int | Offset | |||
) | [private] |
Definition at line 323 of file XrdOfsPoscq.cc.
References eDest, XrdSysError::Emsg(), ReqOffs, ReqSize, and sprintf().
const int XrdOfsPoscq::ReqOffs = 64 [static] |
Definition at line 32 of file XrdOfsPoscq.hh.
Referenced by Init(), List(), ReWrite(), and VerOffset().
const int XrdOfsPoscq::ReqSize = sizeof(Request) [static] |
Definition at line 33 of file XrdOfsPoscq.hh.
Referenced by Add(), Init(), List(), ReWrite(), and VerOffset().
XrdSysMutex XrdOfsPoscq::myMutex [private] |
XrdSysError* XrdOfsPoscq::eDest [private] |
Definition at line 73 of file XrdOfsPoscq.hh.
Referenced by Add(), Commit(), Del(), FailIni(), Init(), reqWrite(), ReWrite(), VerOffset(), and XrdOfsPoscq().
XrdOss* XrdOfsPoscq::ossFS [private] |
FileSlot* XrdOfsPoscq::SlotList [private] |
FileSlot* XrdOfsPoscq::SlotLust [private] |
char* XrdOfsPoscq::pocFN [private] |
Definition at line 77 of file XrdOfsPoscq.hh.
Referenced by FailIni(), Init(), reqWrite(), ReWrite(), and XrdOfsPoscq().
int XrdOfsPoscq::pocSZ [private] |
Definition at line 78 of file XrdOfsPoscq.hh.
Referenced by Add(), Init(), ReWrite(), and XrdOfsPoscq().
int XrdOfsPoscq::pocFD [private] |
Definition at line 79 of file XrdOfsPoscq.hh.
Referenced by Init(), reqWrite(), ReWrite(), and XrdOfsPoscq().
int XrdOfsPoscq::pocIQ [private] |