|
xrootd
|
#include <XrdOssSpace.hh>

Classes | |
| struct | uEnt |
Public Types | |
| enum | sType { Serv = 0, Pstg = 1, Purg = 2, Admin = 3, RsvA = 4, RsvB = 5, RsvC = 6, addT = 7, Totn = 8 } |
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 = 0 |
| static const char * | uFname = 0 |
| static uEnt | uData [maxEnt] = {{{0}}} |
| static short | uDvec [maxEnt] = {0} |
| static time_t | lastMtime = 0 |
| static int | fencEnt = 0 |
| static int | freeEnt = -1 |
| static int | aFD = -1 |
| static int | Solitary = 0 |
| enum XrdOssSpace::sType |
| XrdOssSpace::XrdOssSpace | ( | ) | [inline] |
| XrdOssSpace::~XrdOssSpace | ( | ) | [inline] |
| void XrdOssSpace::Adjust | ( | int | Gent, |
| off_t | Space, | ||
| sType | stNum = Serv |
||
| ) | [static] |
References Admin, aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, pread(), Pstg, Purg, pwrite(), Serv, Solitary, uData, uFname, ULen, and UsageLock().
Referenced by Adjust(), XrdFrmAdmin::AuditUsage(), and XrdFrmAdmin::Reloc().
| void XrdOssSpace::Adjust | ( | const char * | GName, |
| off_t | Space, | ||
| sType | stNum = Serv |
||
| ) | [static] |
| int XrdOssSpace::Assign | ( | const char * | GName, |
| long long & | bytesUsed | ||
| ) | [static] |
References addT, aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, findEnt(), freeEnt, maxEnt, pwrite(), Serv, uData, uDvec, uFname, and UsageLock().
Referenced by XrdOssCache::Init().
| int XrdOssSpace::findEnt | ( | const char * | GName | ) | [static, private] |
| int XrdOssSpace::Init | ( | ) | [static] |
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] |
References aFD, DataSz, XrdSysError::Emsg(), XrdOucEnv::Export(), fencEnt, freeEnt, XrdOucUtils::InstName(), maxEnt, mkdir(), open(), opts, pwrite(), qFname, Quotas(), read(), Readjust(), S_IRGRP, S_IRUSR, S_IRWXG, S_IRWXU, S_IWGRP, S_IWUSR, Solitary, stat(), uData, uDvec, uFname, UsageLock(), and write().
| int XrdOssSpace::Quotas | ( | ) | [static] |
References XrdOuca2x::a2sz(), XrdOucStream::Attach(), close, XrdCms::Config, XrdSysError::Emsg(), XrdOssCache_Group::fsgroups, XrdOucStream::GetMyFirstWord(), XrdOucStream::GetWord(), XrdOssCache_Group::group, lastMtime, minSNbsz, XrdOssCache_Group::next, open(), XrdOssCache_Group::PubQuota, qFname, XrdOssCache_Group::Quota, and stat().
Referenced by Init().
| int XrdOssSpace::Readjust | ( | int | i | ) | [static, private] |
| int XrdOssSpace::Readjust | ( | ) | [static] |
References aFD, XrdSysError::Emsg(), fencEnt, fstat(), 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] |
References aFD, XrdSysError::Emsg(), fencEnt, freeEnt, pwrite(), uData, uDvec, uFname, and UsageLock().
| long long XrdOssSpace::Usage | ( | const char * | GName, |
| struct uEnt & | uVal, | ||
| int | rrd = 0 |
||
| ) | [static] |
References aFD, XrdOssSpace::uEnt::Bytes, XrdSysError::Emsg(), fencEnt, findEnt(), pread(), Serv, uData, uDvec, uFname, and UsageLock().
| static long long XrdOssSpace::Usage | ( | int | gent | ) | [inline, static] |
References maxEnt, Serv, and uData.
Referenced by XrdFrmAdmin::QueryUsage().
| int XrdOssSpace::UsageLock | ( | int | Dolock = 1 | ) | [static, private] |
References aFD, XrdSysError::Emsg(), fcntl(), FLOCK_t, and uFname.
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), and Usage().
int XrdOssSpace::aFD = -1 [static, private] |
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), Usage(), and UsageLock().
const int XrdOssSpace::DataSz = 16384 [static, private] |
Referenced by Init().
int XrdOssSpace::fencEnt = 0 [static, private] |
Referenced by Adjust(), Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
int XrdOssSpace::freeEnt = -1 [static, private] |
Referenced by Assign(), Init(), and Unassign().
const int XrdOssSpace::haveQuota = 2 [static] |
Referenced by Init().
const int XrdOssSpace::haveUsage = 1 [static] |
Referenced by Init(), and XrdFrmAdmin::QueryUsage().
time_t XrdOssSpace::lastMtime = 0 [static, private] |
Referenced by Quotas().
const int XrdOssSpace::maxEnt = DataSz/sizeof(uEnt) [static, private] |
const int XrdOssSpace::maxSNlen = 63 [static] |
Referenced by XrdOssSys::getStats(), XrdOssPath::posCname(), and XrdOssSys::xspace().
const int XrdOssSpace::minSNbsz = 64 [static] |
const char * XrdOssSpace::qFname = 0 [static, private] |
int XrdOssSpace::Solitary = 0 [static, private] |
XrdOssSpace::uEnt XrdOssSpace::uData = {{{0}}} [static, private] |
Referenced by Adjust(), Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
short XrdOssSpace::uDvec = {0} [static, private] |
Referenced by Assign(), findEnt(), Init(), Readjust(), Unassign(), and Usage().
const char * XrdOssSpace::uFname = 0 [static, private] |
Referenced by Adjust(), Assign(), Init(), Readjust(), Unassign(), Usage(), and UsageLock().
const int XrdOssSpace::ULen = sizeof(long long) [static, private] |
Referenced by Adjust().
1.7.3