File: README

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (280 lines) | stat: -rw-r--r-- 5,035 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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
133
134
135
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280

			/* Disk Pool Manager client structures */

struct dpm_pool {
	char		poolname[CA_MAXPOOLNAMELEN+1];
	u_signed64	defsize;
	int		defpintime;
	int		put_retenp;
	char		fss_policy[CA_MAXPOLICYLEN+1];
	char		gc_policy[CA_MAXPOLICYLEN+1];
	char		rs_policy[CA_MAXPOLICYLEN+1];
	gid_t		gid;
	char		s_type;
	u_signed64	capacity;
	u_signed64	free;
	int		nbelem;
};

struct dpm_fs {
	char		poolname[CA_MAXPOOLNAMELEN+1];
	char		server[CA_MAXHOSTNAMELEN+1];
	char		fs[80];
	u_signed64	capacity;
	u_signed64	free;
	int		status;
};

struct dpm_copyfilereq {
	char		*from_surl;
	char		*to_surl;
	time_t		lifetime;
	char		f_type;
	char		s_token[CA_MAXDPMTOKENLEN+1];
	int		flags;
};

struct dpm_copyfilestatus {
	char		*from_surl;
	char		*to_surl;
	u_signed64	filesize;
	int		status;
	char		*errstring;
	time_t		pintime;
};

struct dpm_filestatus {
	char		*surl;
	int		status;
	char		*errstring;
};

struct dpm_getfilereq {
	char		*from_surl;
	time_t		lifetime;
	char		f_type;
	char		s_token[CA_MAXDPMTOKENLEN+1];
	int		flags;
};

struct dpm_getfilestatus {
	char		*from_surl;
	char		*turl;
	u_signed64	filesize;
	int		status;
	char		*errstring;
	time_t		pintime;
};

struct dpm_putfilereq {
	char		*to_surl;
	time_t		lifetime;
	char		f_type;
	char		s_token[CA_MAXDPMTOKENLEN+1];
	u_signed64	requested_size;
};

struct dpm_putfilestatus {
	char		*to_surl;
	char		*turl;
	u_signed64	filesize;
	int		status;
	char		*errstring;
	time_t		pintime;
};

struct dpm_reqsummary {
	char		r_token[CA_MAXDPMTOKENLEN+1];
	char		r_type;
	int		nb_reqfiles;
	int		nb_queued;
	int		nb_finished;
	int		nb_progress;
};

struct dpm_space_metadata {
	char		s_type;
	char		s_token[CA_MAXDPMTOKENLEN+1];
	char		client_dn[256];
	u_signed64	t_space;	/* Total space */
	u_signed64	g_space;	/* Guaranteed space */
	u_signed64	u_space;	/* Unused space */
	time_t		a_lifetime;	/* Lifetime assigned */
	time_t		r_lifetime;	/* Remaining lifetime */
};

struct dpm_tokeninfo {
	char		r_token[CA_MAXDPMTOKENLEN+1];
	time_t		c_time;
};

			/* function prototypes */

int dpm_reservespace (
	const char s_type,
	const char *u_token,
	u_signed64 req_t_space,
	u_signed64 req_g_space,
	time_t req_lifetime,
	char *actual_s_type,
	u_signed64 *actual_t_space,
	u_signed64 *actual_g_space,
	time_t *actual_lifetime,
	char *s_token);

int dpm_releasespace (
	char *s_token,
	int force);

int dpm_updatespace (
	char *s_token,
	u_signed64 req_t_space,
	u_signed64 req_g_space,
	time_t req_lifetime,
	u_signed64 *actual_t_space,
	u_signed64 *actual_g_space,
	time_t *actual_lifetime);

int dpm_getspacemd (
	int nbtokens,
	char **s_tokens,
	int *nbreplies,
	struct dpm_space_metadata **spacemd);

int dpm_getspacetoken (
	const char *u_token,
	int *nbreplies,
	char ***s_tokens);

int dpm_rm (
	int nbpaths,
	char **paths,
	int *nbreplies,
	struct dpm_filestatus **filestatuses);

int dpm_get (
	int nbreqfiles,
	struct dpm_getfilereq *reqfiles,
	int nbprotocols,
	char **protocols,
	char *u_token,
	time_t retrytime,
	char *r_token,
	int *nbreplies,
	struct dpm_getfilestatus **filestatuses);

int dpm_put (
	int nbreqfiles,
	struct dpm_putfilereq *reqfiles,
	int nbprotocols,
	char **protocols,
	char *u_token,
	int overwrite,
	time_t retrytime,
	char *r_token,
	int *nbreplies,
	struct dpm_putfilestatus **filestatuses);

int dpm_copy (
	int nbreqfiles,
	struct dpm_copyfilereq *reqfiles,
	char *u_token,
	int flags,
	time_t retrytime,
	char *r_token,
	int *nbreplies,
	struct dpm_copyfilestatus **filestatuses);

int dpm_relfiles (
	char *r_token,
	int nbsurls,
	char **surls,
	int keepspace,
	int *nbreplies,
	struct dpm_filestatus **filestatuses);

int dpm_putdone (
	char *r_token,
	int nbsurls,
	char **surls,
	int *nbreplies,
	struct dpm_filestatus **filestatuses);

int dpm_abortreq (
	char *r_token);

int dpm_getstatus_getreq (
	char *r_token,
	int nbfromsurls,
	char **fromsurls,
	int *nbreplies,
	struct dpm_getfilestatus **filestatuses);

int dpm_getstatus_putreq (
	char *r_token,
	int nbtosurls,
	char **tosurls,
	int *nbreplies,
	struct dpm_putfilestatus **filestatuses);

int dpm_getstatus_copyreq (
	char *r_token,
	int nbsurls,
	char **fromsurls,
	char **tosurls,
	int *nbreplies,
	struct dpm_copyfilestatus **filestatuses);

int dpm_getreqsummary (
	int nbtokens;
	char **r_tokens,
	int *nbreplies,
	struct dpm_reqsummary **summaries);

int dpm_extendfilelife (
	char *r_token,
	char *surl,
	time_t lifetime,
	time_t *actual_lifetime);

int dpm_getreqid (
	const char *u_token,
	int *nbreplies,
	struct dpm_tokeninfo **tokeninfos);

int dpm_addpool (
	struct dpm_pool *dpm_pool);

int dpm_getpools (
	int *nbpools,
	struct dpm_pool **dpm_pool);

int dpm_modifypool (
	struct dpm_pool *dpm_pool);

int dpm_rmpool (
	char *poolname);

int dpm_addfs (
	char *poolname,
	char *server,
	char *fs,
	int status);

int dpm_getpoolfs (
	char *poolname,
	int *nbfs,
	struct dpm_fs **dpm_fs);

int dpm_modifyfs (
	char *server,
	char *fs,
	int status);

int dpm_rmfs (
	char *server,
	char *fs);

int dpm_getprotocols (
	int *nb_supported_protocols,
	char ***supported_protocols);