1DPM_RESERVESPACE(3) DPM Library Functions DPM_RESERVESPACE(3)
2
3
4
6 dpm_reservespace - reserve space
7
9 #include <sys/types.h>
10 #include "dpm_api.h"
11
12 int dpm_reservespace (const char s_type, const char *u_token, const
13 char ret_policy, const char ac_latency, u_signed64 req_t_space,
14 u_signed64 req_g_space, time_t req_lifetime, int nbgids, gid_t
15 *req_gids, const char *poolname, char *actual_s_type, u_signed64
16 *actual_t_space, u_signed64 *actual_g_space, time_t *actual_lifetime,
17 char *s_token)
18
20 dpm_reservespace reserves space.
21
22 The input arguments are:
23
24 s_type specifies the type of space requested. It can be V (for
25 Volatile), D (for Durable), P (for Permanent) or - (for any).
26
27 u_token
28 specifies the user provided description associated with the
29 request. This argument may be NULL.
30
31 ret_policy
32 specifies the retention policy requested. It can be R (for
33 REPLICA), O (for OUTPUT) or C (for CUSTODIAL).
34
35 ac_latency
36 specifies the access latency requested. It can be O (for ONLINE)
37 or N (for NEARLINE).
38
39 req_t_space
40 Total space requested in bytes.
41
42 req_g_space
43 Guaranteed space requested in bytes.
44
45 req_lifetime
46 specifies the requested space lifetime (in seconds) relative to
47 the current time.
48
49 nbgids is the size of the array of group ids req_gids.
50
51 req_gids
52 when zero, the space is reserved for the user if the requester
53 has a proxy without VOMS extension or for the group if the
54 requester has a proxy with VOMS extension. If not zero, the
55 space is reserved for this set of group ids. If the caller does
56 not belong to the group, it must have ADMIN privileges.
57
58 poolname
59 If not NULL, reserves the space in that disk pool.
60
61 The output arguments are:
62
63 actual_s_type
64 Type of reserved space.
65
66 actual_t_space
67 Total space reserved in bytes (best effort).
68
69 actual_g_space
70 Guaranteed space reserved in bytes.
71
72 actual_lifetime
73 Lifetime of the reserved space (in seconds) relative to the cur‐
74 rent time.
75
76 s_token
77 Address of a buffer to receive the system allocated token.
78
80 This routine returns 0 if the operation was successful or -1 if the
81 operation failed. In the latter case, serrno is set appropriately.
82
84 EACCES The caller does not belong to the group identified by
85 req_gid and does not have ADMIN privileges.
86
87 EFAULT nbgids is greater than 0 and req_gids is a NULL pointer.
88
89 EINVAL The space type is invalid or the length of the user space
90 token description is greater than 255, the space requested
91 is not a positive value, the pool name is longer than
92 CA_MAXPOOLNAMELEN or unknown.
93
94 SENOSHOST Host unknown.
95
96 SEINTERNAL Database error.
97
98 SECOMERR Communication error.
99
100
101
102LCG $Date: 2008/09/24 11:25:00 $ DPM_RESERVESPACE(3)