#include <XrdOssSpace.hh>
Public Types | |
enum | sType |
Public Member Functions | |
XrdOssSpace () | |
~XrdOssSpace () | |
Static Public Member Functions | |
static void | Adjust (int Gent, off_t Space, sType=Serv) |
static void | Adjust (const char *GName, off_t Space, sType=Serv) |
static int | Assign (const char *GName, long long &bytesUsed) |
static int | Init () |
static int | Init (const char *aPath, const char *qFile, int isSOL) |
static int | Quotas () |
static int | Readjust () |
static void | Refresh () |
static int | Unassign (const char *GName) |
static long long | Usage (int gent) |
static long long | Usage (const char *GName, struct uEnt &uVal, int rrd=0) |
Static Public Attributes | |
static const int | maxSNlen = 63 |
static const int | minSNbsz = 64 |
static const int | haveUsage = 1 |
static const int | haveQuota = 2 |
Static Private Member Functions | |
static int | findEnt (const char *GName) |
static int | Readjust (int) |
static int | UsageLock (int Dolock=1) |
Static Private Attributes | |
static const int | ULen = sizeof(long long) |
static const int | DataSz = 16384 |
static const int | maxEnt = DataSz/sizeof(uEnt) |
static const char * | qFname |
static const char * | uFname |
static uEnt | uData [maxEnt] |
static short | uDvec [maxEnt] |
static time_t | lastMtime |
static int | fencEnt |
static int | freeEnt |
static int | aFD |
static int | Solitary |
Classes | |
struct | uEnt |
Definition at line 17 of file XrdOssSpace.hh.
enum XrdOssSpace::sType |
Definition at line 21 of file XrdOssSpace.hh.
XrdOssSpace::XrdOssSpace | ( | ) | [inline] |
Definition at line 52 of file XrdOssSpace.hh.
XrdOssSpace::~XrdOssSpace | ( | ) | [inline] |
Definition at line 53 of file XrdOssSpace.hh.
void XrdOssSpace::Adjust | ( | int | Gent, | |
off_t | Space, | |||
sType | = Serv | |||
) | [static] |
Definition at line 51 of file XrdOssSpace.cc.
References Admin, aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, long, offsetof, pread, Pstg, Purg, pwrite, Serv, Solitary, uData, uFname, ULen, and UsageLock().
Referenced by XrdOssCache::Adjust(), Adjust(), XrdFrmAdmin::AuditUsage(), and XrdFrmAdmin::Reloc().
void XrdOssSpace::Adjust | ( | const char * | GName, | |
off_t | Space, | |||
sType | = Serv | |||
) | [static] |
Definition at line 113 of file XrdOssSpace.cc.
References addT, aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, findEnt(), freeEnt, PyROOT::PyStrings::gName, i, maxEnt, pwrite, Serv, strcpy(), uData, uDvec, uFname, and UsageLock().
Referenced by XrdOssCache::Init().
int XrdOssSpace::Init | ( | ) | [static] |
Definition at line 179 of file XrdOssSpace.cc.
References haveQuota, haveUsage, qFname, and uFname.
Referenced by XrdFrmAdmin::AuditUsage(), XrdOssCache::Init(), and XrdFrmAdmin::QueryUsage().
int XrdOssSpace::Init | ( | const char * | aPath, | |
const char * | qFile, | |||
int | isSOL | |||
) | [static] |
Definition at line 183 of file XrdOssSpace.cc.
References aFD, DataSz, XrdSysError::Emsg(), XrdOucEnv::Export(), fencEnt, freeEnt, PyROOT::PyStrings::gName, i, XrdOucUtils::InstName(), maxEnt, mkdir, open, opts, pwrite, qFname, Quotas(), read, Readjust(), S_IRGRP, S_IRUSR, S_IRWXG, S_IRWXU, S_IWGRP, S_IWUSR, Solitary, sprintf(), stat, strcpy(), uData, uDvec, uFname, UsageLock(), and write.
int XrdOssSpace::Quotas | ( | ) | [static] |
Definition at line 279 of file XrdOssSpace.cc.
References XrdOuca2x::a2sz(), close, XrdFrm::Config(), XrdSysError::Emsg(), XrdOssCache_Group::fsgroups, XrdOssCache_Group::group, lastMtime, minSNbsz, XrdOssCache_Group::next, open, XrdOssCache_Group::PubQuota, qFname, XrdOssCache_Group::Quota, stat, strcpy(), and val.
Referenced by Init(), and XrdOssCache::Scan().
int XrdOssSpace::Readjust | ( | ) | [static] |
Definition at line 340 of file XrdOssSpace.cc.
References aFD, XrdSysError::Emsg(), fencEnt, fstat, k, pread, pwrite, stat, uData, uDvec, uFname, and UsageLock().
Referenced by Init(), and XrdOssCache::Scan().
static void XrdOssSpace::Refresh | ( | ) | [static] |
int XrdOssSpace::Unassign | ( | const char * | GName | ) | [static] |
Definition at line 401 of file XrdOssSpace.cc.
References aFD, XrdSysError::Emsg(), fencEnt, freeEnt, PyROOT::PyStrings::gName, i, k, pwrite, uData, uDvec, uFname, and UsageLock().
Definition at line 49 of file XrdOssSpace.hh.
References maxEnt, Serv, and uData.
Referenced by XrdFrmAdmin::AuditUsage(), XrdFrmAdmin::QueryUsage(), and XrdOssCache::Scan().
Definition at line 436 of file XrdOssSpace.cc.
References aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, findEnt(), i, pread, Serv, uData, uDvec, uFname, and UsageLock().
int XrdOssSpace::findEnt | ( | const char * | GName | ) | [static, private] |
Definition at line 164 of file XrdOssSpace.cc.
References fencEnt, PyROOT::PyStrings::gName, i, uData, and uDvec.
int XrdOssSpace::Readjust | ( | int | ) | [static, private] |
Definition at line 383 of file XrdOssSpace.cc.
References Admin, XrdOssSpace::uEnt::Bytes, Pstg, Purg, Serv, and uData.
int XrdOssSpace::UsageLock | ( | int | Dolock = 1 |
) | [static, private] |
Definition at line 470 of file XrdOssSpace.cc.
References aFD, XrdSysError::Emsg(), fcntl(), FLOCK_t, uFname, and RooFit::What().
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), and Usage().
const int XrdOssSpace::maxSNlen = 63 [static] |
Definition at line 25 of file XrdOssSpace.hh.
Referenced by XrdOssSys::getStats(), XrdOssPath::posCname(), and XrdOssSys::xspace().
const int XrdOssSpace::minSNbsz = 64 [static] |
Definition at line 26 of file XrdOssSpace.hh.
Referenced by XrdFrmPurge::Add(), XrdOssSys::Alloc_Cache(), XrdOssPath::genPath(), XrdFrmAdmin::QuerySpace(), Quotas(), XrdFrmAdmin::Reloc(), XrdOssSys::Reloc(), XrdOssSys::StatLS(), XrdOssSys::StatXA(), XrdFrmConfig::xpol(), XrdOssSys::xspace(), and XrdFrmConfig::xspace().
const int XrdOssSpace::haveUsage = 1 [static] |
const int XrdOssSpace::haveQuota = 2 [static] |
const int XrdOssSpace::ULen = sizeof(long long) [static, private] |
const int XrdOssSpace::DataSz = 16384 [static, private] |
const int XrdOssSpace::maxEnt = DataSz/sizeof(uEnt) [static, private] |
const char * XrdOssSpace::qFname [static, private] |
const char * XrdOssSpace::uFname [static, private] |
Definition at line 71 of file XrdOssSpace.hh.
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), Usage(), and UsageLock().
XrdOssSpace::uEnt XrdOssSpace::uData [static, private] |
Definition at line 72 of file XrdOssSpace.hh.
Referenced by Adjust(), Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
short XrdOssSpace::uDvec [static, private] |
Definition at line 73 of file XrdOssSpace.hh.
Referenced by Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
time_t XrdOssSpace::lastMtime [static, private] |
int XrdOssSpace::fencEnt [static, private] |
Definition at line 75 of file XrdOssSpace.hh.
Referenced by Adjust(), Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
int XrdOssSpace::freeEnt [static, private] |
int XrdOssSpace::aFD [static, private] |
Definition at line 77 of file XrdOssSpace.hh.
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), Usage(), and UsageLock().
int XrdOssSpace::Solitary [static, private] |