Loading...
Searching...
No Matches
XrdOssVS.hh
Go to the documentation of this file.
#ifndef __XRDOSS_VS_H__
#define __XRDOSS_VS_H__
/******************************************************************************/
/* */
/* X r d O s s V S . h h */
/* */
/* (c) 2020 by the Board of Trustees of the Leland Stanford, Jr., University */
/* All Rights Reserved */
/* Produced by Andrew Hanushevsky for Stanford University under contract */
/* DE-AC02-76-SFO0515 with the Department of Energy */
/* */
/* This file is part of the XRootD software suite. */
/* */
/* XRootD is free software: you can redistribute it and/or modify it under */
/* the terms of the GNU Lesser General Public License as published by the */
/* Free Software Foundation, either version 3 of the License, or (at your */
/* option) any later version. */
/* */
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
/* License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public License */
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
/* */
/* The copyright holder's institutional names and contributor's names may not */
/* be used to endorse or promote products derived from this software without */
/* specific prior written permission of the institution or contributor. */
/******************************************************************************/
/******************************************************************************/
/* C l a s s X r d O s s V S P a r t */
/******************************************************************************/
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
class XrdOssVSPart
{
public:
const char *pPath; // Valid path to partition (not the allocation path)
const char **aPath; // Allocation root paths for this partition
long long Total; // Total bytes
long long Free; // Total bytes free
unsigned short bdevID; // Device unique ID (bdevs may have many partitions)
unsigned short partID; // Partition unique ID (parts may have the same bdevID)
int rsvd1;
void *rsvd2; // Reserved
XrdOssVSPart() : pPath(0), aPath(0), Total(0), Free(0),
bdevID(0), partID(0), rsvd1(0), rsvd2(0)
{}
~XrdOssVSPart() {}
};
/******************************************************************************/
/* C l a s s X r d O s s V S I n f o */
/******************************************************************************/
// Class passed to StatVS()
//
class XrdOssVSInfo
{
public:
long long Total; // Total bytes
long long Free; // Total bytes free
long long Large; // Total bytes in largest partition
long long LFree; // Max bytes free in contiguous chunk
long long Usage; // Used bytes (if usage enabled)
long long Quota; // Quota bytes (if quota enabled)
int Extents; // Number of partitions/extents
int Reserved;
XrdOssVSPart *vsPart; // Partition info as vsPart[extents] may be nil
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
XrdOssVSPart *Export(int &nParts)
{XrdOssVSPart *pVec = vsPart;
vsPart = 0;
nParts = Extents;
return pVec;
}
XrdOssVSInfo() : Total(0),Free(0),Large(0),LFree(0),Usage(-1),
Quota(-1),Extents(0),Reserved(0), vsPart(0) {}
~XrdOssVSInfo() {if (vsPart) delete [] vsPart;}
};
#endif
XrdOssVSInfo::LFree
long long LFree
Definition XrdOssVS.hh:93
XrdOssVSInfo::Usage
long long Usage
Definition XrdOssVS.hh:94
XrdOssVSInfo::Export
XrdOssVSPart * Export(int &nParts)
Definition XrdOssVS.hh:110
XrdOssVSInfo::Extents
int Extents
Definition XrdOssVS.hh:96
XrdOssVSInfo::Reserved
int Reserved
Definition XrdOssVS.hh:97
XrdOssVSInfo::Large
long long Large
Definition XrdOssVS.hh:92
XrdOssVSInfo::Total
long long Total
Definition XrdOssVS.hh:90
XrdOssVSInfo::~XrdOssVSInfo
~XrdOssVSInfo()
Definition XrdOssVS.hh:119
XrdOssVSInfo::Free
long long Free
Definition XrdOssVS.hh:91
XrdOssVSInfo::XrdOssVSInfo
XrdOssVSInfo()
Definition XrdOssVS.hh:117
XrdOssVSInfo::vsPart
XrdOssVSPart * vsPart
Definition XrdOssVS.hh:98
XrdOssVSInfo::Quota
long long Quota
Definition XrdOssVS.hh:95
XrdOssVSPart
Definition XrdOssVS.hh:64
XrdOssVSPart::partID
unsigned short partID
Definition XrdOssVS.hh:71
XrdOssVSPart::Total
long long Total
Definition XrdOssVS.hh:68
XrdOssVSPart::pPath
const char * pPath
Definition XrdOssVS.hh:66
XrdOssVSPart::aPath
const char ** aPath
Definition XrdOssVS.hh:67
XrdOssVSPart::Free
long long Free
Definition XrdOssVS.hh:69
XrdOssVSPart::rsvd1
int rsvd1
Definition XrdOssVS.hh:72
XrdOssVSPart::bdevID
unsigned short bdevID
Definition XrdOssVS.hh:70
XrdOssVSPart::~XrdOssVSPart
~XrdOssVSPart()
Definition XrdOssVS.hh:78
XrdOssVSPart::XrdOssVSPart
XrdOssVSPart()
Definition XrdOssVS.hh:75
XrdOssVSPart::rsvd2
void * rsvd2
Definition XrdOssVS.hh:73