1DPM_RESERVESPACE(3) DPM Library Functions
2DPM_RESERVESPACE(3)
3
4
5
6[1mNAME[0m
7 dpm_reservespace ‐ reserve space
8
9[1mSYNOPSIS[0m
10 [1m#include <sys/types.h>[0m
11 [1m#include "dpm_api.h"[0m
12
13 [1mint dpm_reservespace (const char
14[4m[22ms_type[24m[1m, const char *[4m[22mu_token[24m[1m, const[0m
15 [1mchar [4m[22mret_policy[24m[1m, const char
16[4m[22mac_latency[24m[1m, u_signed64
17[4m[22mreq_t_space[24m[1m,[0m
18 [1mu_signed64 [4m[22mreq_g_space[24m[1m, time_t
19[4m[22mreq_lifetime[24m[1m, int [4m[22mnbgids[24m[1m, gid_t[0m
20 [1m*[4m[22mreq_gids[24m[1m, const char *[4m[22mpool‐
21name,[24m [1mchar *[4m[22mactual_s_type[24m[1m, u_signed64[0m
22 [1m*[4m[22mactual_t_space[24m[1m, u_signed64 *[4m[22mac‐
23tual_g_space[24m[1m, time_t *[4m[22mactual_lifetime[24m[1m,[0m
24 [1mchar *[4m[22ms_token[24m[1m)[0m
25
26[1mDESCRIPTION[0m
27 [1mdpm_reservespace [22mreserves space.
28
29 The input arguments are:
30
31 [4ms_type[24m specifies the type of space requested.
32It can be [1mV [22m(for
33 Volatile), [1mD [22m(for Durable), [1mP [22m(for
34Permanent) or [1m‐ [22m(for any).
35
36 [4mu_token[0m
37 specifies the user provided description asso‐
38ciated with the
39 request. This argument may be NULL.
40
41 [4mret_policy[0m
42 specifies the retention policy requested. It can
43be [1mR [22m(for
44 REPLICA), [1mO [22m(for OUTPUT) or [1mC [22m(for
45CUSTODIAL).
46
47 [4mac_latency[0m
48 specifies the access latency requested. It can be
49[1mO [22m(for ONLINE)
50 or [1mN [22m(for NEARLINE).
51
52 [4mreq_t_space[0m
53 Total space requested in bytes.
54
55 [4mreq_g_space[0m
56 Guaranteed space requested in bytes.
57
58 [4mreq_lifetime[0m
59 specifies the requested space lifetime (in seconds)
60relative to
61 the current time.
62
63 [4mnbgids[24m is the size of the array of group ids
64[4mreq_gids[24m.
65
66 [4mreq_gids[0m
67 when zero, the space is reserved for the user if
68the requester
69 has a proxy without VOMS extension or for the
70group if the
71 requester has a proxy with VOMS extension. If
72not zero, the
73 space is reserved for this set of group ids. If
74the caller does
75 not belong to the group, it must have ADMIN privi‐
76leges.
77
78 [4mpoolname[0m
79 If not NULL, reserves the space in that disk pool.
80
81 The output arguments are:
82
83 [4mactual_s_type[0m
84 Type of reserved space.
85
86 [4mactual_t_space[0m
87 Total space reserved in bytes (best effort).
88
89 [4mactual_g_space[0m
90 Guaranteed space reserved in bytes.
91
92 [4mactual_lifetime[0m
93 Lifetime of the reserved space (in seconds) rela‐
94tive to the cur‐
95 rent time.
96
97 [4ms_token[0m
98 Address of a buffer to receive the system allocated
99token.
100
101[1mRETURN VALUE[0m
102 This routine returns 0 if the operation was successful or
103‐1 if the
104 operation failed. In the latter case, [1mserrno [22mis set
105appropriately.
106
107[1mERRORS[0m
108 [1mEACCES [22mThe caller does not belong to the
109group identified by
110 [4mreq_gid[24m and does not have ADMIN privi‐
111leges.
112
113 [1mEFAULT [4m[22mnbgids[24m is greater than 0 and
114[4mreq_gids[24m is a NULL pointer.
115
116 [1mEINVAL [22mThe space type is invalid or the
117length of the user space
118 token description is greater than 255, the
119space requested
120 is not a positive value, the pool name is
121longer than
122 [1mCA_MAXPOOLNAMELEN [22mor unknown or the
123number of gids is too
124 big.
125
126 [1mSENOSHOST [22mHost unknown.
127
128 [1mSEINTERNAL [22mDatabase error.
129
130 [1mSECOMERR [22mCommunication error.
131
132
133
134LCG $Date$
135DPM_RESERVESPACE(3)
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198