1DPM_GETSPACEMD(3) DPM Library Functions
2DPM_GETSPACEMD(3)
3
4
5
6[1mNAME[0m
7 dpm_getspacemd ‐ get space metadata
8
9[1mSYNOPSIS[0m
10 [1m#include <sys/types.h>[0m
11 [1m#include "dpm_api.h"[0m
12
13 [1mint dpm_getspacemd (int [4m[22mnbtokens[24m[1m,
14char **[4m[22ms_tokens[24m[1m, int *[4m[22mnbreplies[24m[1m,[0m
15 [1mstruct dpm_space_metadata **[4m[22mspacemd[24m[1m)[0m
16
17[1mDESCRIPTION[0m
18 [1mdpm_getspacemd [22mgets space metadata.
19
20 The input arguments are:
21
22 [4mnbtokens[0m
23 specifies the number of tokens in the request.
24
25 [4ms_tokens[0m
26 specifies an array of tokens returned by previous
27reservespace
28 requests.
29
30 The output arguments are:
31
32 [4mnbreplies[0m
33 will be set to the number of replies in the array
34of space meta‐
35 data.
36
37 [4mspacemd[0m
38 will be set to the address of an array of
39dpm_space_metadata
40 structures allocated by the API. The client
41application is
42 responsible for freeing the array when not needed
43anymore.
44
45 struct dpm_space_metadata {
46 char s_type;
47 char s_token[CA_MAXDPMTOKENLEN+1];
48 uid_t s_uid;
49 gid_t s_gid;
50 char ret_policy;
51 char ac_latency;
52 char u_token[256];
53 char client_dn[256];
54 u_signed64 t_space; /* Total space */
55 u_signed64 g_space; /* Guaranteed space */
56 signed64 u_space; /* Unused space */
57 char poolname[CA_MAXPOOLNAMELEN+1];
58 time_t a_lifetime; /* Lifetime assigned */
59 time_t r_lifetime; /* Remaining lifetime
60*/
61 int nbgids;
62 gid_t *gids; /* restrict the space
63to given group(s) */
64 };
65
66[1mRETURN VALUE[0m
67 This routine returns 0 if the operation was successful or
68‐1 if the
69 operation failed. In the latter case, [1mserrno [22mis set
70appropriately.
71
72[1mERRORS[0m
73 [1mEFAULT [4m[22ms_tokens[24m [4m,[24m [4mn‐
74breplies[24m or [4mspacemd[24m is a NULL pointer.
75
76 [1mENOMEM [22mMemory could not be allocated for
77storing the reply.
78
79 [1mEINVAL [4m[22mnbtokens[24m is not strictly posi‐
80tive or the specified tokens
81 are invalid/unknown.
82
83 [1mSENOSHOST [22mHost unknown.
84
85 [1mSEINTERNAL [22mDatabase error.
86
87 [1mSECOMERR [22mCommunication error.
88
89
90
91LCG $Date: 2008/09/25 10:17:46 $
92DPM_GETSPACEMD(3)
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132