XRootD
Loading...
Searching...
No Matches
XrdOssCache_FSData Class Reference

#include <XrdOssCache.hh>

+ Collaboration diagram for XrdOssCache_FSData:

Public Member Functions

 XrdOssCache_FSData (const char *, STATFS_t &, dev_t)
 
 ~XrdOssCache_FSData ()
 

Public Attributes

unsigned short bdevID
 
const char * devN
 
long long frsz
 
dev_t fsid
 
XrdOssCache_FSDatanext
 
const char * pact
 
unsigned short partID
 
const char * path
 
long long size
 
int stat
 
time_t updt
 

Detailed Description

Definition at line 106 of file XrdOssCache.hh.

Constructor & Destructor Documentation

◆ XrdOssCache_FSData()

XrdOssCache_FSData::XrdOssCache_FSData ( const char * fsp,
STATFS_t & fsbuff,
dev_t fsID )

Definition at line 105 of file XrdOssCache.cc.

108{
109 path = strdup(fsp);
110 if (!(pact= realpath(fsp,0))) pact = path;
111 size = static_cast<long long>(fsbuff.f_blocks)
112 * static_cast<long long>(fsbuff.FS_BLKSZ);
113 frsz = static_cast<long long>(fsbuff.f_bavail)
114 * static_cast<long long>(fsbuff.FS_BLKSZ);
120 fsid = fsID;
121 updt = time(0);
122 next = 0;
123 stat = 0;
124
125// This is created only for new partitions!
126//
127 std::map<dev_t, devID>::iterator it = dev2ID.find(fsID);
128 if (it != dev2ID.end())
129 {bdevID = static_cast<unsigned short>(it->second.bdevID);
130 if (it->second.partID == 0) it->second.partID = prtNMax++;
131 partID = static_cast<unsigned short>(it->second.partID);
132 devN = it->second.nDev;
133 } else {
134 bdevID = 0;
135 partID = static_cast<unsigned short>(prtNMax++);
136 devN = "dev";
137 }
138}
const char * path
const char * devN
const char * pact
unsigned short partID
unsigned short bdevID
XrdOssCache_FSData * next
static long long fsLarge
static long long fsTotal
static long long fsTotFr
static int fsCount
static long long fsFree
std::map< dev_t, devID > dev2ID

References bdevID, XrdOssCacheDevs::dev2ID, devN, frsz, XrdOssCache::fsCount, XrdOssCache::fsFree, fsid, XrdOssCache::fsLarge, XrdOssCache::fsTotal, XrdOssCache::fsTotFr, next, pact, partID, path, XrdOssCacheDevs::prtNMax, size, stat, and updt.

◆ ~XrdOssCache_FSData()

XrdOssCache_FSData::~XrdOssCache_FSData ( )
inline

Definition at line 123 of file XrdOssCache.hh.

123{if (path) free((void *)path);}

References path.

Member Data Documentation

◆ bdevID

unsigned short XrdOssCache_FSData::bdevID

Definition at line 119 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), XrdOssCache_FS::getSpace(), and XrdOssCache::List().

◆ devN

const char* XrdOssCache_FSData::devN

Definition at line 116 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), and XrdOssCache::List().

◆ frsz

long long XrdOssCache_FSData::frsz

◆ fsid

dev_t XrdOssCache_FSData::fsid

Definition at line 113 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), and XrdOssCache::Adjust().

◆ next

XrdOssCache_FSData* XrdOssCache_FSData::next

Definition at line 110 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), XrdOssCache::Adjust(), and XrdOssCache::Scan().

◆ pact

const char* XrdOssCache_FSData::pact

Definition at line 115 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), and XrdOssCache::List().

◆ partID

unsigned short XrdOssCache_FSData::partID

Definition at line 120 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), XrdOssCache_FS::getSpace(), and XrdOssCache::List().

◆ path

◆ size

long long XrdOssCache_FSData::size

Definition at line 111 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData(), XrdOssCache_FS::getSpace(), and XrdOssCache::Scan().

◆ stat

int XrdOssCache_FSData::stat

◆ updt

time_t XrdOssCache_FSData::updt

Definition at line 117 of file XrdOssCache.hh.

Referenced by XrdOssCache_FSData().


The documentation for this class was generated from the following files: