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