|
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 fencEnt, Solitary, Serv, Pstg, Purg, UsageLock(), pread(), aFD, uData, XrdSysError::Emsg(), uFname, Admin, XrdOssSpace::uEnt::Bytes, pwrite(), and ULen.
Referenced by XrdFrmAdmin::AuditUsage(), XrdFrmAdmin::Reloc(), and Adjust().
| void XrdOssSpace::Adjust | ( | const char * | GName, |
| off_t | Space, | ||
| sType | stNum = Serv |
||
| ) | [static] |
| int XrdOssSpace::Assign | ( | const char * | GName, |
| long long & | bytesUsed | ||
| ) | [static] |
References findEnt(), uData, XrdOssSpace::uEnt::Bytes, Serv, freeEnt, maxEnt, XrdSysError::Emsg(), uFname, UsageLock(), addT, pwrite(), aFD, uDvec, and fencEnt.
Referenced by XrdOssCache::Init().
| int XrdOssSpace::findEnt | ( | const char * | GName | ) | [static, private] |
| int XrdOssSpace::Init | ( | ) | [static] |
References uFname, haveUsage, qFname, and haveQuota.
Referenced by XrdFrmAdmin::AuditUsage(), XrdFrmAdmin::QueryUsage(), and XrdOssCache::Init().
| int XrdOssSpace::Init | ( | const char * | aPath, |
| const char * | qFile, | ||
| int | isSOL | ||
| ) | [static] |
References S_IRUSR, S_IWUSR, S_IRGRP, S_IWGRP, stat(), opts, Solitary, qFname, Quotas(), XrdOucEnv::Export(), XrdOucUtils::InstName(), mkdir(), S_IRWXU, S_IRWXG, uFname, XrdSysError::Emsg(), DataSz, aFD, open(), UsageLock(), uData, write(), fencEnt, freeEnt, read(), maxEnt, uDvec, Readjust(), and pwrite().
| int XrdOssSpace::Quotas | ( | ) | [static] |
References XrdCms::Config, stat(), minSNbsz, qFname, XrdSysError::Emsg(), lastMtime, open(), XrdOucStream::Attach(), XrdOucStream::GetMyFirstWord(), XrdOucStream::GetWord(), XrdOuca2x::a2sz(), XrdOssCache_Group::group, XrdOssCache_Group::next, XrdOssCache_Group::Quota, and close.
Referenced by Init().
| int XrdOssSpace::Readjust | ( | ) | [static] |
References stat(), fencEnt, fstat(), aFD, uDvec, UsageLock(), pread(), uData, XrdSysError::Emsg(), uFname, and pwrite().
Referenced by XrdOssCache::Scan(), and Init().
| int XrdOssSpace::Readjust | ( | int | i | ) | [static, private] |
| static void XrdOssSpace::Refresh | ( | ) | [static] |
| int XrdOssSpace::Unassign | ( | const char * | GName | ) | [static] |
References fencEnt, uData, uDvec, UsageLock(), pwrite(), aFD, freeEnt, XrdSysError::Emsg(), and uFname.
| static long long XrdOssSpace::Usage | ( | int | gent | ) | [inline, static] |
References maxEnt, uData, and Serv.
Referenced by XrdFrmAdmin::QueryUsage().
| long long XrdOssSpace::Usage | ( | const char * | GName, |
| struct uEnt & | uVal, | ||
| int | rrd = 0 |
||
| ) | [static] |
References fencEnt, UsageLock(), uDvec, pread(), aFD, uData, XrdSysError::Emsg(), uFname, findEnt(), XrdOssSpace::uEnt::Bytes, and Serv.
| int XrdOssSpace::UsageLock | ( | int | Dolock = 1 | ) | [static, private] |
References FLOCK_t, fcntl(), aFD, XrdSysError::Emsg(), 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 XrdFrmAdmin::QueryUsage(), and Init().
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::xspace(), XrdOssPath::posCname(), and XrdOssSys::getStats().
const int XrdOssSpace::minSNbsz = 64 [static] |
Referenced by Quotas().
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.5