summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-common.h
blob: fd3fba869f53d6ec9e401066870b13d8faaaaf5d (plain)
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
/*
  Copyright (c); 2016 Red Hat, Inc. <http://www.redhat.com>
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later);, or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.
*/

#ifndef __CLIENT_COMMON_H__
#define __CLIENT_COMMON_H__

#include "dict.h"
#include "xlator.h"
#include "rpc-common-xdr.h"
#include "glusterfs3-xdr.h"
#include "glusterfs3.h"
#include "client.h"

int
client_pre_stat (xlator_t *this, gfs3_stat_req *req, loc_t *loc,
                 dict_t *xdata);

int
client_pre_readlink (xlator_t *this, gfs3_readlink_req *req, loc_t *loc,
                     size_t size, dict_t *xdata);

int
client_pre_mknod (xlator_t *this, gfs3_mknod_req *req, loc_t *loc,
                   mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata);

int
client_pre_mkdir (xlator_t *this, gfs3_mkdir_req *req, loc_t *loc,
                   mode_t mode, mode_t umask, dict_t *xdata);

int
client_pre_unlink (xlator_t *this, gfs3_unlink_req *req, loc_t *loc,
                    int32_t flags, dict_t *xdata);

int
client_pre_rmdir (xlator_t *this, gfs3_rmdir_req *req, loc_t *loc,
                   int32_t flags, dict_t *xdata);

int
client_pre_symlink (xlator_t *this, gfs3_symlink_req *req, loc_t *loc,
                     const char *linkname, mode_t umask, dict_t *xdata);

int
client_pre_rename (xlator_t *this, gfs3_rename_req *req, loc_t *oldloc,
                   loc_t *newloc, dict_t *xdata);

int
client_pre_link (xlator_t *this,
                  gfs3_link_req *req, loc_t *oldloc, loc_t *newloc,
                  dict_t *xdata);

int
client_pre_truncate (xlator_t *this, gfs3_truncate_req *req,
                     loc_t *loc, off_t offset, dict_t *xdata);

int
client_pre_open (xlator_t *this, gfs3_open_req *req, loc_t *loc, fd_t *fd,
                  int32_t flags, dict_t *xdata);

int
client_pre_readv (xlator_t *this, gfs3_read_req *req, fd_t *fd, size_t size,
                  off_t offset, int32_t flags, dict_t *xdata);

int
client_pre_writev (xlator_t *this, gfs3_write_req *req,
                   fd_t *fd, size_t size, off_t offset, int32_t flags,
                   dict_t **xdata);

int
client_pre_statfs (xlator_t *this, gfs3_statfs_req *req, loc_t *loc,
                   dict_t *xdata);

int
client_pre_flush (xlator_t *this, gfs3_flush_req *req, fd_t *fd, dict_t *xdata);

int
client_pre_fsync (xlator_t *this, gfs3_fsync_req *req, fd_t *fd,
                   int32_t flags, dict_t *xdata);

int
client_pre_setxattr (xlator_t *this, gfs3_setxattr_req *req, loc_t *loc,
                      dict_t *xattr, int32_t flags, dict_t *xdata);

int
client_pre_getxattr (xlator_t *this, gfs3_getxattr_req *req, loc_t *loc,
                     const char *name, dict_t *xdata);

int
client_pre_removexattr (xlator_t *this, gfs3_removexattr_req *req,
                         loc_t *loc, const char *name, dict_t *xdata);

int
client_pre_opendir (xlator_t *this,
                    gfs3_opendir_req *req, loc_t *loc,
                    fd_t *fd, dict_t *xdata);

int
client_pre_fsyncdir (xlator_t *this, gfs3_fsyncdir_req *req, fd_t *fd,
                      int32_t flags, dict_t *xdata);

int
client_pre_access (xlator_t *this, gfs3_access_req *req, loc_t *loc,
                   int32_t mask, dict_t *xdata);

int
client_pre_create (xlator_t *this, gfs3_create_req *req,
                    loc_t *loc, fd_t *fd, mode_t mode,
                    int32_t flags, mode_t umask, dict_t *xdata);

int
client_pre_ftruncate (xlator_t *this, gfs3_ftruncate_req *req, fd_t *fd,
                       off_t offset, dict_t *xdata);

int
client_pre_fstat (xlator_t *this, gfs3_fstat_req *req, fd_t *fd,
                   dict_t *xdata);

int
client_pre_lk (xlator_t *this, gfs3_lk_req *req,
               int32_t cmd, struct gf_flock *flock, fd_t *fd, dict_t *xdata);

int
client_pre_lookup (xlator_t *this, gfs3_lookup_req *req, loc_t *loc,
                   dict_t *xdata);

int
client_pre_readdir (xlator_t *this, gfs3_readdir_req *req, fd_t *fd,
                    size_t size, off_t offset, dict_t *xdata);

int
client_pre_inodelk (xlator_t *this, gfs3_inodelk_req *req, loc_t *loc,
                     int cmd, struct gf_flock *flock, const char *volume,
                     dict_t *xdata);

int
client_pre_finodelk (xlator_t *this, gfs3_finodelk_req *req, fd_t *fd,
                     int cmd, struct gf_flock *flock, const char *volume,
                     dict_t *xdata);

int
client_pre_entrylk (xlator_t *this, gfs3_entrylk_req *req, loc_t *loc,
                     entrylk_cmd cmd_entrylk, entrylk_type type,
                     const char *volume, const char *basename, dict_t *xdata);

int
client_pre_fentrylk (xlator_t *this, gfs3_fentrylk_req *req, fd_t *fd,
                      entrylk_cmd cmd_entrylk, entrylk_type type,
                      const char *volume, const char *basename, dict_t *xdata);

int
client_pre_xattrop (xlator_t *this, gfs3_xattrop_req *req, loc_t *loc,
                    dict_t *xattr, int32_t flags, dict_t *xdata);

int
client_pre_fxattrop (xlator_t *this, gfs3_fxattrop_req *req, fd_t *fd,
                    dict_t *xattr, int32_t flags, dict_t *xdata);

int
client_pre_fgetxattr (xlator_t *this, gfs3_fgetxattr_req *req, fd_t *fd,
                      const char *name, dict_t *xdata);

int
client_pre_fsetxattr (xlator_t *this, gfs3_fsetxattr_req *req, fd_t *fd,
                       int32_t flags, dict_t *xattr, dict_t *xdata);
int
client_pre_seek (xlator_t *this, gfs3_seek_req *req, fd_t *fd,
                 off_t offset, gf_seek_what_t what, dict_t *xdata);

int
client_pre_rchecksum (xlator_t *this, gfs3_rchecksum_req *req, fd_t *fd,
                       int32_t len, off_t offset, dict_t *xdata);

int
client_pre_setattr (xlator_t *this, gfs3_setattr_req *req, loc_t *loc,
                     int32_t valid, struct iatt *stbuf, dict_t *xdata);
int
client_pre_fsetattr (xlator_t *this, gfs3_fsetattr_req *req, fd_t *fd,
                     int32_t valid, struct iatt *stbuf, dict_t *xdata);

int
client_pre_readdirp (xlator_t *this, gfs3_readdirp_req *req, fd_t *fd,
                     size_t size, off_t offset, dict_t *xdata);

int
client_pre_fremovexattr (xlator_t *this, gfs3_fremovexattr_req *req, fd_t *fd,
                          const char *name, dict_t *xdata);

int
client_pre_fallocate (xlator_t *this, gfs3_fallocate_req *req, fd_t *fd,
                      int32_t flags, off_t offset, size_t size, dict_t *xdata);
int
client_pre_discard (xlator_t *this, gfs3_discard_req *req, fd_t *fd,
                    off_t offset, size_t size, dict_t *xdata);
int
client_pre_zerofill (xlator_t *this, gfs3_zerofill_req *req, fd_t *fd,
                     off_t offset, size_t size, dict_t *xdata);
int
client_pre_ipc (xlator_t *this, gfs3_ipc_req *req, int32_t cmd,
                 dict_t *xdata);

int
client_pre_lease (xlator_t *this, gfs3_lease_req *req, loc_t *loc,
                  struct gf_lease *lease, dict_t *xdata);

int
client_post_stat (xlator_t *this, gfs3_stat_rsp *rsp, struct iatt *iatt,
                  dict_t **xdata);

int
client_post_readlink (xlator_t *this, gfs3_readlink_rsp *rsp,
                      struct iatt *iatt, dict_t **xdata);

int
client_post_mknod (xlator_t *this, gfs3_mknod_rsp *rsp, struct iatt *stbuf,
                   struct iatt *preparent, struct iatt *postparent,
                   dict_t **xdata);

int
client_post_mkdir (xlator_t *this, gfs3_mkdir_rsp *rsp, struct iatt *stbuf,
                   struct iatt *preparent, struct iatt *postparent,
                   dict_t **xdata);

int
client_post_unlink (xlator_t *this, gfs3_unlink_rsp *rsp,
                   struct iatt *preparent, struct iatt *postparent,
                   dict_t **xdata);

int
client_post_rmdir (xlator_t *this, gfs3_rmdir_rsp *rsp,
                   struct iatt *preparent, struct iatt *postparent,
                   dict_t **xdata);

int
client_post_symlink (xlator_t *this, gfs3_symlink_rsp *rsp, struct iatt *stbuf,
                     struct iatt *preparent, struct iatt *postparent,
                     dict_t **xdata);

int
client_post_rename (xlator_t *this, gfs3_rename_rsp *rsp, struct iatt *stbuf,
                   struct iatt *preoldparent, struct iatt *postoldparent,
                   struct iatt *prenewparent, struct iatt *postnewparent,
                   dict_t **xdata);
int
client_post_link (xlator_t *this, gfs3_link_rsp *rsp, struct iatt *stbuf,
                  struct iatt *preparent, struct iatt *postparent,
                  dict_t **xdata);

int
client_post_truncate (xlator_t *this, gfs3_truncate_rsp *rsp,
                      struct iatt *prestat, struct iatt *poststat,
                      dict_t **xdata);

int
client_post_open (xlator_t *this, gfs3_open_rsp *rsp, dict_t **xdata);

int
client_post_readv (xlator_t *this, gfs3_read_rsp *rsp, struct iobref **iobref,
                   struct iobref *rsp_iobref, struct iatt *stat,
                   struct iovec *vector, struct iovec *rsp_vector,
                   int *rspcount, dict_t **xdata);

int
client_post_writev (xlator_t *this, gfs3_write_rsp *rsp, struct iatt *prestat,
                    struct iatt *poststat, dict_t **xdata);

int
client_post_statfs (xlator_t *this, gfs3_statfs_rsp *rsp,
                    struct statvfs *statfs, dict_t **xdata);

int
client_post_flush (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_fsync (xlator_t *this, gfs3_fsync_rsp *rsp,
                   struct iatt *prestat, struct iatt *poststat,
                   dict_t **xdata);
int
client_post_setxattr (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_getxattr (xlator_t *this, gfs3_getxattr_rsp *rsp, dict_t **dict,
                      dict_t **xdata);

int
client_post_removexattr (xlator_t *this, gf_common_rsp *rsp,
                         dict_t **xdata);

int
client_post_opendir (xlator_t *this, gfs3_opendir_rsp *rsp, dict_t **xdata);

int
client_post_fsyncdir (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_access (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_create (xlator_t *this, gfs3_create_rsp *rsp,
                    struct iatt *stbuf, struct iatt *preparent,
                    struct iatt *postparent,
                    clnt_local_t *local, dict_t **xdata);

int
client_post_ftruncate (xlator_t *this, gfs3_ftruncate_rsp *rsp,
                       struct iatt *prestat, struct iatt *poststat,
                       dict_t **xdata);

int
client_post_fstat (xlator_t *this, gfs3_fstat_rsp *rsp, struct iatt *stat,
                   dict_t **xdata);

int
client_post_lk (xlator_t *this, gfs3_lk_rsp *rsp, struct gf_flock *lock,
                dict_t **xdata);

int
client_post_lookup (xlator_t *this, gfs3_lookup_rsp *rsp, struct iatt *stbuf,
                    struct iatt *postparent, dict_t **xdata);

int
client_post_readdir (xlator_t *this, gfs3_readdir_rsp *rsp,
                     gf_dirent_t *entries, dict_t **xdata);

int
client_post_inodelk (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_finodelk (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_entrylk (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_fentrylk (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_xattrop (xlator_t *this, gfs3_xattrop_rsp *rsp, dict_t **dict,
                      dict_t **xdata);

int
client_post_fxattrop (xlator_t *this, gfs3_fxattrop_rsp *rsp, dict_t **dict,
                      dict_t **xdata);

int
client_post_fgetxattr (xlator_t *this, gfs3_fgetxattr_rsp *rsp, dict_t **dict,
                      dict_t **xdata);

int
client_post_fsetxattr (xlator_t *this, gf_common_rsp *rsp, dict_t **xdata);

int
client_post_rchecksum (xlator_t *this, gfs3_rchecksum_rsp *rsp, dict_t **xdata);

int
client_post_setattr (xlator_t *this, gfs3_setattr_rsp *rsp,
                     struct iatt *prestat, struct iatt *poststat,
                     dict_t **xdata);

int
client_post_fsetattr (xlator_t *this, gfs3_fsetattr_rsp *rsp,
                      struct iatt *prestat, struct iatt *poststat,
                      dict_t **xdata);

int
client_post_readdirp (xlator_t *this, gfs3_readdirp_rsp *rsp,
                      fd_t *fd, gf_dirent_t *entries,
                      dict_t **xdata);

int
client_post_fremovexattr (xlator_t *this, gf_common_rsp *rsp,
                          dict_t **xdata);

int
client_post_fallocate (xlator_t *this, gfs3_fallocate_rsp *rsp,
                   struct iatt *prestat, struct iatt *poststat,
                   dict_t **xdata);

int
client_post_discard (xlator_t *this, gfs3_discard_rsp *rsp,
                     struct iatt *prestat,
                     struct iatt *poststat, dict_t **xdata);

int
client_post_zerofill (xlator_t *this, gfs3_zerofill_rsp *rsp,
                     struct iatt *prestat, struct iatt *poststat,
                     dict_t **xdata);

int
client_post_ipc (xlator_t *this, gfs3_ipc_rsp *rsp, dict_t **xdata);

int
client_post_seek (xlator_t *this, gfs3_seek_rsp *rsp, dict_t **xdata);

int
client_post_lease (xlator_t *this, gfs3_lease_rsp *rsp, struct gf_lease *lease,
                   dict_t **xdata);
#endif /* __CLIENT_COMMON_H__ */