summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorGluster Ant <bugzilla-bot@gluster.org>2018-09-12 17:22:48 +0530
committerNigel Babu <nigelb@redhat.com>2018-09-12 17:22:48 +0530
commit45a71c0548b6fd2c757aa2e7b7671a1411948894 (patch)
tree2a5a9b73bae47ab53a41166fd041a06612587f48 /xlators/protocol
parentbe77dbbda692792335a8e9e7c02e0c281f003c40 (diff)
Land clang-format changes
Change-Id: I6f5d8140a06f3c1b2d196849299f8d483028d33b
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-common.h636
-rw-r--r--xlators/protocol/client/src/client-mem-types.h19
-rw-r--r--xlators/protocol/client/src/client-messages.h96
-rw-r--r--xlators/protocol/client/src/client.h771
-rw-r--r--xlators/protocol/server/src/authenticate.h24
-rw-r--r--xlators/protocol/server/src/server-common.h202
-rw-r--r--xlators/protocol/server/src/server-helpers.h124
-rw-r--r--xlators/protocol/server/src/server-mem-types.h31
-rw-r--r--xlators/protocol/server/src/server-messages.h134
-rw-r--r--xlators/protocol/server/src/server.h377
10 files changed, 1144 insertions, 1270 deletions
diff --git a/xlators/protocol/client/src/client-common.h b/xlators/protocol/client/src/client-common.h
index b0690aa75d8..21d416d9f27 100644
--- a/xlators/protocol/client/src/client-common.h
+++ b/xlators/protocol/client/src/client-common.h
@@ -20,629 +20,605 @@
#include "client.h"
int
-client_pre_stat (xlator_t *this, gfs3_stat_req *req, loc_t *loc,
- dict_t *xdata);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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,
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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,
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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,
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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);
+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,
+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);
+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);
+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);
+client_post_lease(xlator_t *this, gfs3_lease_rsp *rsp, struct gf_lease *lease,
+ dict_t **xdata);
/* New functions for version 4 */
int
-client_post_common_dict (xlator_t *this, gfx_common_dict_rsp *rsp, dict_t **dict,
- dict_t **xdata);
+client_post_common_dict(xlator_t *this, gfx_common_dict_rsp *rsp, dict_t **dict,
+ dict_t **xdata);
int
-client_post_common_3iatt (xlator_t *this, gfx_common_3iatt_rsp *rsp, struct iatt *iatt,
- struct iatt *iatt2, struct iatt *iatt3, dict_t **xdata);
+client_post_common_3iatt(xlator_t *this, gfx_common_3iatt_rsp *rsp,
+ struct iatt *iatt, struct iatt *iatt2,
+ struct iatt *iatt3, dict_t **xdata);
int
-client_post_common_2iatt (xlator_t *this, gfx_common_2iatt_rsp *rsp, struct iatt *iatt,
- struct iatt *iatt2, dict_t **xdata);
+client_post_common_2iatt(xlator_t *this, gfx_common_2iatt_rsp *rsp,
+ struct iatt *iatt, struct iatt *iatt2, dict_t **xdata);
int
-client_post_common_iatt (xlator_t *this, gfx_common_iatt_rsp *rsp, struct iatt *iatt,
- dict_t **xdata);
+client_post_common_iatt(xlator_t *this, gfx_common_iatt_rsp *rsp,
+ struct iatt *iatt, dict_t **xdata);
int
-client_post_common_rsp (xlator_t *this, gfx_common_rsp *rsp, dict_t **xdata);
+client_post_common_rsp(xlator_t *this, gfx_common_rsp *rsp, dict_t **xdata);
+int
+client_pre_stat_v2(xlator_t *this, gfx_stat_req *req, loc_t *loc,
+ dict_t *xdata);
int
-client_pre_stat_v2 (xlator_t *this, gfx_stat_req *req, loc_t *loc,
- dict_t *xdata);
+client_pre_readlink_v2(xlator_t *this, gfx_readlink_req *req, loc_t *loc,
+ size_t size, dict_t *xdata);
int
-client_pre_readlink_v2 (xlator_t *this, gfx_readlink_req *req, loc_t *loc,
- size_t size, dict_t *xdata);
+client_pre_mknod_v2(xlator_t *this, gfx_mknod_req *req, loc_t *loc, mode_t mode,
+ dev_t rdev, mode_t umask, dict_t *xdata);
int
-client_pre_mknod_v2 (xlator_t *this, gfx_mknod_req *req, loc_t *loc,
- mode_t mode, dev_t rdev, mode_t umask, dict_t *xdata);
+client_pre_mkdir_v2(xlator_t *this, gfx_mkdir_req *req, loc_t *loc, mode_t mode,
+ mode_t umask, dict_t *xdata);
int
-client_pre_mkdir_v2 (xlator_t *this, gfx_mkdir_req *req, loc_t *loc,
- mode_t mode, mode_t umask, dict_t *xdata);
+client_pre_unlink_v2(xlator_t *this, gfx_unlink_req *req, loc_t *loc,
+ int32_t flags, dict_t *xdata);
int
-client_pre_unlink_v2 (xlator_t *this, gfx_unlink_req *req, loc_t *loc,
+client_pre_rmdir_v2(xlator_t *this, gfx_rmdir_req *req, loc_t *loc,
int32_t flags, dict_t *xdata);
int
-client_pre_rmdir_v2 (xlator_t *this, gfx_rmdir_req *req, loc_t *loc,
- int32_t flags, dict_t *xdata);
+client_pre_symlink_v2(xlator_t *this, gfx_symlink_req *req, loc_t *loc,
+ const char *linkname, mode_t umask, dict_t *xdata);
int
-client_pre_symlink_v2 (xlator_t *this, gfx_symlink_req *req, loc_t *loc,
- const char *linkname, mode_t umask, dict_t *xdata);
+client_pre_rename_v2(xlator_t *this, gfx_rename_req *req, loc_t *oldloc,
+ loc_t *newloc, dict_t *xdata);
int
-client_pre_rename_v2 (xlator_t *this, gfx_rename_req *req, loc_t *oldloc,
+client_pre_link_v2(xlator_t *this, gfx_link_req *req, loc_t *oldloc,
loc_t *newloc, dict_t *xdata);
int
-client_pre_link_v2 (xlator_t *this,
- gfx_link_req *req, loc_t *oldloc, loc_t *newloc,
- dict_t *xdata);
-
-int
-client_pre_truncate_v2 (xlator_t *this, gfx_truncate_req *req,
- loc_t *loc, off_t offset, dict_t *xdata);
-
-int
-client_pre_open_v2 (xlator_t *this, gfx_open_req *req, loc_t *loc, fd_t *fd,
- int32_t flags, dict_t *xdata);
+client_pre_truncate_v2(xlator_t *this, gfx_truncate_req *req, loc_t *loc,
+ off_t offset, dict_t *xdata);
int
-client_pre_readv_v2 (xlator_t *this, gfx_read_req *req, fd_t *fd, size_t size,
- off_t offset, int32_t flags, dict_t *xdata);
+client_pre_open_v2(xlator_t *this, gfx_open_req *req, loc_t *loc, fd_t *fd,
+ int32_t flags, dict_t *xdata);
int
-client_pre_writev_v2 (xlator_t *this, gfx_write_req *req,
- fd_t *fd, size_t size, off_t offset, int32_t flags,
- dict_t **xdata);
+client_pre_readv_v2(xlator_t *this, gfx_read_req *req, fd_t *fd, size_t size,
+ off_t offset, int32_t flags, dict_t *xdata);
int
-client_pre_statfs_v2 (xlator_t *this, gfx_statfs_req *req, loc_t *loc,
- dict_t *xdata);
+client_pre_writev_v2(xlator_t *this, gfx_write_req *req, fd_t *fd, size_t size,
+ off_t offset, int32_t flags, dict_t **xdata);
int
-client_pre_flush_v2 (xlator_t *this, gfx_flush_req *req, fd_t *fd, dict_t *xdata);
+client_pre_statfs_v2(xlator_t *this, gfx_statfs_req *req, loc_t *loc,
+ dict_t *xdata);
int
-client_pre_fsync_v2 (xlator_t *this, gfx_fsync_req *req, fd_t *fd,
- int32_t flags, dict_t *xdata);
+client_pre_flush_v2(xlator_t *this, gfx_flush_req *req, fd_t *fd,
+ dict_t *xdata);
int
-client_pre_setxattr_v2 (xlator_t *this, gfx_setxattr_req *req, loc_t *loc,
- dict_t *xattr, int32_t flags, dict_t *xdata);
+client_pre_fsync_v2(xlator_t *this, gfx_fsync_req *req, fd_t *fd, int32_t flags,
+ dict_t *xdata);
int
-client_pre_getxattr_v2 (xlator_t *this, gfx_getxattr_req *req, loc_t *loc,
- const char *name, dict_t *xdata);
+client_pre_setxattr_v2(xlator_t *this, gfx_setxattr_req *req, loc_t *loc,
+ dict_t *xattr, int32_t flags, dict_t *xdata);
int
-client_pre_removexattr_v2 (xlator_t *this, gfx_removexattr_req *req,
- loc_t *loc, const char *name, dict_t *xdata);
+client_pre_getxattr_v2(xlator_t *this, gfx_getxattr_req *req, loc_t *loc,
+ const char *name, dict_t *xdata);
int
-client_pre_opendir_v2 (xlator_t *this,
- gfx_opendir_req *req, loc_t *loc,
- fd_t *fd, dict_t *xdata);
+client_pre_removexattr_v2(xlator_t *this, gfx_removexattr_req *req, loc_t *loc,
+ const char *name, dict_t *xdata);
int
-client_pre_fsyncdir_v2 (xlator_t *this, gfx_fsyncdir_req *req, fd_t *fd,
- int32_t flags, dict_t *xdata);
+client_pre_opendir_v2(xlator_t *this, gfx_opendir_req *req, loc_t *loc,
+ fd_t *fd, dict_t *xdata);
int
-client_pre_access_v2 (xlator_t *this, gfx_access_req *req, loc_t *loc,
- int32_t mask, dict_t *xdata);
+client_pre_fsyncdir_v2(xlator_t *this, gfx_fsyncdir_req *req, fd_t *fd,
+ int32_t flags, dict_t *xdata);
int
-client_pre_create_v2 (xlator_t *this, gfx_create_req *req,
- loc_t *loc, fd_t *fd, mode_t mode,
- int32_t flags, mode_t umask, dict_t *xdata);
+client_pre_access_v2(xlator_t *this, gfx_access_req *req, loc_t *loc,
+ int32_t mask, dict_t *xdata);
int
-client_pre_ftruncate_v2 (xlator_t *this, gfx_ftruncate_req *req, fd_t *fd,
- off_t offset, dict_t *xdata);
+client_pre_create_v2(xlator_t *this, gfx_create_req *req, loc_t *loc, fd_t *fd,
+ mode_t mode, int32_t flags, mode_t umask, dict_t *xdata);
int
-client_pre_fstat_v2 (xlator_t *this, gfx_fstat_req *req, fd_t *fd,
- dict_t *xdata);
+client_pre_ftruncate_v2(xlator_t *this, gfx_ftruncate_req *req, fd_t *fd,
+ off_t offset, dict_t *xdata);
int
-client_pre_lk_v2 (xlator_t *this, gfx_lk_req *req,
- int32_t cmd, struct gf_flock *flock, fd_t *fd, dict_t *xdata);
+client_pre_fstat_v2(xlator_t *this, gfx_fstat_req *req, fd_t *fd,
+ dict_t *xdata);
int
-client_pre_lookup_v2 (xlator_t *this, gfx_lookup_req *req, loc_t *loc,
- dict_t *xdata);
+client_pre_lk_v2(xlator_t *this, gfx_lk_req *req, int32_t cmd,
+ struct gf_flock *flock, fd_t *fd, dict_t *xdata);
int
-client_pre_readdir_v2 (xlator_t *this, gfx_readdir_req *req, fd_t *fd,
- size_t size, off_t offset, dict_t *xdata);
+client_pre_lookup_v2(xlator_t *this, gfx_lookup_req *req, loc_t *loc,
+ dict_t *xdata);
int
-client_pre_inodelk_v2 (xlator_t *this, gfx_inodelk_req *req, loc_t *loc,
- int cmd, struct gf_flock *flock, const char *volume,
- dict_t *xdata);
+client_pre_readdir_v2(xlator_t *this, gfx_readdir_req *req, fd_t *fd,
+ size_t size, off_t offset, dict_t *xdata);
int
-client_pre_finodelk_v2 (xlator_t *this, gfx_finodelk_req *req, fd_t *fd,
- int cmd, struct gf_flock *flock, const char *volume,
- dict_t *xdata);
+client_pre_inodelk_v2(xlator_t *this, gfx_inodelk_req *req, loc_t *loc, int cmd,
+ struct gf_flock *flock, const char *volume,
+ dict_t *xdata);
int
-client_pre_entrylk_v2 (xlator_t *this, gfx_entrylk_req *req, loc_t *loc,
- entrylk_cmd cmd_entrylk, entrylk_type type,
- const char *volume, const char *basename, dict_t *xdata);
+client_pre_finodelk_v2(xlator_t *this, gfx_finodelk_req *req, fd_t *fd, int cmd,
+ struct gf_flock *flock, const char *volume,
+ dict_t *xdata);
int
-client_pre_fentrylk_v2 (xlator_t *this, gfx_fentrylk_req *req, fd_t *fd,
+client_pre_entrylk_v2(xlator_t *this, gfx_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_xattrop_v2 (xlator_t *this, gfx_xattrop_req *req, loc_t *loc,
- dict_t *xattr, int32_t flags, dict_t *xdata);
+client_pre_fentrylk_v2(xlator_t *this, gfx_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_fxattrop_v2 (xlator_t *this, gfx_fxattrop_req *req, fd_t *fd,
- dict_t *xattr, int32_t flags, dict_t *xdata);
+client_pre_xattrop_v2(xlator_t *this, gfx_xattrop_req *req, loc_t *loc,
+ dict_t *xattr, int32_t flags, dict_t *xdata);
+
+int
+client_pre_fxattrop_v2(xlator_t *this, gfx_fxattrop_req *req, fd_t *fd,
+ dict_t *xattr, int32_t flags, dict_t *xdata);
int
-client_pre_fgetxattr_v2 (xlator_t *this, gfx_fgetxattr_req *req, fd_t *fd,
- const char *name, dict_t *xdata);
+client_pre_fgetxattr_v2(xlator_t *this, gfx_fgetxattr_req *req, fd_t *fd,
+ const char *name, dict_t *xdata);
int
-client_pre_fsetxattr_v2 (xlator_t *this, gfx_fsetxattr_req *req, fd_t *fd,
- int32_t flags, dict_t *xattr, dict_t *xdata);
+client_pre_fsetxattr_v2(xlator_t *this, gfx_fsetxattr_req *req, fd_t *fd,
+ int32_t flags, dict_t *xattr, dict_t *xdata);
int
-client_pre_seek_v2 (xlator_t *this, gfx_seek_req *req, fd_t *fd,
- off_t offset, gf_seek_what_t what, dict_t *xdata);
+client_pre_seek_v2(xlator_t *this, gfx_seek_req *req, fd_t *fd, off_t offset,
+ gf_seek_what_t what, dict_t *xdata);
int
-client_pre_rchecksum_v2 (xlator_t *this, gfx_rchecksum_req *req, fd_t *fd,
- int32_t len, off_t offset, dict_t *xdata);
+client_pre_rchecksum_v2(xlator_t *this, gfx_rchecksum_req *req, fd_t *fd,
+ int32_t len, off_t offset, dict_t *xdata);
int
-client_pre_setattr_v2 (xlator_t *this, gfx_setattr_req *req, loc_t *loc,
- int32_t valid, struct iatt *stbuf, dict_t *xdata);
+client_pre_setattr_v2(xlator_t *this, gfx_setattr_req *req, loc_t *loc,
+ int32_t valid, struct iatt *stbuf, dict_t *xdata);
int
-client_pre_fsetattr_v2 (xlator_t *this, gfx_fsetattr_req *req, fd_t *fd,
- int32_t valid, struct iatt *stbuf, dict_t *xdata);
+client_pre_fsetattr_v2(xlator_t *this, gfx_fsetattr_req *req, fd_t *fd,
+ int32_t valid, struct iatt *stbuf, dict_t *xdata);
int
-client_pre_readdirp_v2 (xlator_t *this, gfx_readdirp_req *req, fd_t *fd,
- size_t size, off_t offset, dict_t *xdata);
+client_pre_readdirp_v2(xlator_t *this, gfx_readdirp_req *req, fd_t *fd,
+ size_t size, off_t offset, dict_t *xdata);
int
-client_pre_fremovexattr_v2 (xlator_t *this, gfx_fremovexattr_req *req, fd_t *fd,
- const char *name, dict_t *xdata);
+client_pre_fremovexattr_v2(xlator_t *this, gfx_fremovexattr_req *req, fd_t *fd,
+ const char *name, dict_t *xdata);
int
-client_pre_fallocate_v2 (xlator_t *this, gfx_fallocate_req *req, fd_t *fd,
- int32_t flags, off_t offset, size_t size, dict_t *xdata);
+client_pre_fallocate_v2(xlator_t *this, gfx_fallocate_req *req, fd_t *fd,
+ int32_t flags, off_t offset, size_t size,
+ dict_t *xdata);
int
-client_pre_discard_v2 (xlator_t *this, gfx_discard_req *req, fd_t *fd,
- off_t offset, size_t size, dict_t *xdata);
+client_pre_discard_v2(xlator_t *this, gfx_discard_req *req, fd_t *fd,
+ off_t offset, size_t size, dict_t *xdata);
int
-client_pre_zerofill_v2 (xlator_t *this, gfx_zerofill_req *req, fd_t *fd,
- off_t offset, size_t size, dict_t *xdata);
+client_pre_zerofill_v2(xlator_t *this, gfx_zerofill_req *req, fd_t *fd,
+ off_t offset, size_t size, dict_t *xdata);
int
-client_pre_ipc_v2 (xlator_t *this, gfx_ipc_req *req, int32_t cmd,
- dict_t *xdata);
+client_pre_ipc_v2(xlator_t *this, gfx_ipc_req *req, int32_t cmd, dict_t *xdata);
int
-client_pre_lease_v2 (xlator_t *this, gfx_lease_req *req, loc_t *loc,
- struct gf_lease *lease, dict_t *xdata);
+client_pre_lease_v2(xlator_t *this, gfx_lease_req *req, loc_t *loc,
+ struct gf_lease *lease, dict_t *xdata);
int
-client_pre_put_v2 (xlator_t *this, gfx_put_req *req, loc_t *loc, mode_t mode,
- mode_t umask, int32_t flags, size_t size, off_t offset,
- dict_t *xattr, dict_t *xdata);
+client_pre_put_v2(xlator_t *this, gfx_put_req *req, loc_t *loc, mode_t mode,
+ mode_t umask, int32_t flags, size_t size, off_t offset,
+ dict_t *xattr, dict_t *xdata);
int
-client_post_readv_v2 (xlator_t *this, gfx_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);
-
+client_post_readv_v2(xlator_t *this, gfx_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_create_v2 (xlator_t *this, gfx_create_rsp *rsp,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent,
- clnt_local_t *local, dict_t **xdata);
+client_post_create_v2(xlator_t *this, gfx_create_rsp *rsp, struct iatt *stbuf,
+ struct iatt *preparent, struct iatt *postparent,
+ clnt_local_t *local, dict_t **xdata);
int
-client_post_lease_v2 (xlator_t *this, gfx_lease_rsp *rsp, struct gf_lease *lease,
- dict_t **xdata);
+client_post_lease_v2(xlator_t *this, gfx_lease_rsp *rsp, struct gf_lease *lease,
+ dict_t **xdata);
int
-client_post_lk_v2 (xlator_t *this, gfx_lk_rsp *rsp, struct gf_flock *lock,
- dict_t **xdata);
+client_post_lk_v2(xlator_t *this, gfx_lk_rsp *rsp, struct gf_flock *lock,
+ dict_t **xdata);
int
-client_post_readdir_v2 (xlator_t *this, gfx_readdir_rsp *rsp,
- gf_dirent_t *entries, dict_t **xdata);
+client_post_readdir_v2(xlator_t *this, gfx_readdir_rsp *rsp,
+ gf_dirent_t *entries, dict_t **xdata);
int
-client_post_readdirp_v2 (xlator_t *this, gfx_readdirp_rsp *rsp,
- fd_t *fd, gf_dirent_t *entries,
- dict_t **xdata);
+client_post_readdirp_v2(xlator_t *this, gfx_readdirp_rsp *rsp, fd_t *fd,
+ gf_dirent_t *entries, dict_t **xdata);
int
-client_post_rename_v2 (xlator_t *this, gfx_rename_rsp *rsp, struct iatt *stbuf,
- struct iatt *preoldparent, struct iatt *postoldparent,
- struct iatt *prenewparent, struct iatt *postnewparent,
- dict_t **xdata);
+client_post_rename_v2(xlator_t *this, gfx_rename_rsp *rsp, struct iatt *stbuf,
+ struct iatt *preoldparent, struct iatt *postoldparent,
+ struct iatt *prenewparent, struct iatt *postnewparent,
+ dict_t **xdata);
#endif /* __CLIENT_COMMON_H__ */
diff --git a/xlators/protocol/client/src/client-mem-types.h b/xlators/protocol/client/src/client-mem-types.h
index 1e995414ed8..bf01a90abb9 100644
--- a/xlators/protocol/client/src/client-mem-types.h
+++ b/xlators/protocol/client/src/client-mem-types.h
@@ -8,21 +8,20 @@
cases as published by the Free Software Foundation.
*/
-
#ifndef __CLIENT_MEM_TYPES_H__
#define __CLIENT_MEM_TYPES_H__
#include "mem-types.h"
enum gf_client_mem_types_ {
- gf_client_mt_clnt_conf_t = gf_common_mt_end + 1,
- gf_client_mt_clnt_req_buf_t,
- gf_client_mt_clnt_fdctx_t,
- gf_client_mt_clnt_lock_t,
- gf_client_mt_clnt_fd_lk_local_t,
- gf_client_mt_clnt_args_t,
- gf_client_mt_compound_req_t,
- gf_client_mt_clnt_lock_request_t,
- gf_client_mt_end,
+ gf_client_mt_clnt_conf_t = gf_common_mt_end + 1,
+ gf_client_mt_clnt_req_buf_t,
+ gf_client_mt_clnt_fdctx_t,
+ gf_client_mt_clnt_lock_t,
+ gf_client_mt_clnt_fd_lk_local_t,
+ gf_client_mt_clnt_args_t,
+ gf_client_mt_compound_req_t,
+ gf_client_mt_clnt_lock_request_t,
+ gf_client_mt_end,
};
#endif /* __CLIENT_MEM_TYPES_H__ */
diff --git a/xlators/protocol/client/src/client-messages.h b/xlators/protocol/client/src/client-messages.h
index 5f146c67efe..879d53741d1 100644
--- a/xlators/protocol/client/src/client-messages.h
+++ b/xlators/protocol/client/src/client-messages.h
@@ -23,75 +23,31 @@
* glfs-message-id.h.
*/
-GLFS_MSGID(PC,
- PC_MSG_TIMER_EXPIRED,
- PC_MSG_DIR_OP_FAILED,
- PC_MSG_FILE_OP_FAILED,
- PC_MSG_TIMER_REG,
- PC_MSG_GRACE_TIMER_CANCELLED,
- PC_MSG_DICT_SET_FAILED,
- PC_MSG_DICT_GET_FAILED,
- PC_MSG_NO_MEMORY,
- PC_MSG_RPC_CBK_FAILED,
- PC_MSG_FUNCTION_CALL_ERROR,
- PC_MSG_RPC_INITED_ALREADY,
- PC_MSG_RPC_INIT,
- PC_MSG_RPC_DESTROY,
- PC_MSG_RPC_INVALID_CALL,
- PC_MSG_INVALID_ENTRY,
- PC_MSG_HANDSHAKE_RETURN,
- PC_MSG_CHILD_UP_NOTIFY_FAILED,
- PC_MSG_CLIENT_DISCONNECTED,
- PC_MSG_CHILD_DOWN_NOTIFY_FAILED,
- PC_MSG_PARENT_UP,
- PC_MSG_PARENT_DOWN,
- PC_MSG_RPC_INIT_FAILED,
- PC_MSG_RPC_NOTIFY_FAILED,
- PC_MSG_FD_DUPLICATE_TRY,
- PC_MSG_FD_SET_FAIL,
- PC_MSG_DICT_UNSERIALIZE_FAIL,
- PC_MSG_FD_GET_FAIL,
- PC_MSG_FD_CTX_INVALID,
- PC_MSG_FOP_SEND_FAILED,
- PC_MSG_XDR_DECODING_FAILED,
- PC_MSG_REMOTE_OP_FAILED,
- PC_MSG_RPC_STATUS_ERROR,
- PC_MSG_VOL_FILE_NOT_FOUND,
- PC_MSG_SEND_REQ_FAIL,
- PC_MSG_LOCK_VERSION_SERVER,
- PC_MSG_SET_LK_VERSION_ERROR,
- PC_MSG_LOCK_REQ_FAIL,
- PC_MSG_CLIENT_REQ_FAIL,
- PC_MSG_LOCK_ERROR,
- PC_MSG_LOCK_REACQUIRE,
- PC_MSG_CHILD_UP_NOTIFY,
- PC_MSG_CHILD_UP_NOTIFY_DELAY,
- PC_MSG_VOL_SET_FAIL,
- PC_MSG_SETVOLUME_FAIL,
- PC_MSG_VOLFILE_NOTIFY_FAILED,
- PC_MSG_REMOTE_VOL_CONNECTED,
- PC_MSG_LOCK_MISMATCH,
- PC_MSG_LOCK_MATCH,
- PC_MSG_AUTH_FAILED,
- PC_MSG_AUTH_FAILED_NOTIFY_FAILED,
- PC_MSG_CHILD_CONNECTING_EVENT,
- PC_MSG_CHILD_CONNECTING_NOTIFY_FAILED,
- PC_MSG_PROCESS_UUID_SET_FAIL,
- PC_MSG_DICT_ERROR,
- PC_MSG_DICT_SERIALIZE_FAIL,
- PC_MSG_PGM_NOT_FOUND,
- PC_MSG_VERSION_INFO,
- PC_MSG_PORT_NUM_ERROR,
- PC_MSG_VERSION_ERROR,
- PC_MSG_DIR_OP_SUCCESS,
- PC_MSG_BAD_FD,
- PC_MSG_CLIENT_LOCK_INFO,
- PC_MSG_CACHE_INVALIDATION_FAIL,
- PC_MSG_CHILD_STATUS,
- PC_MSG_GFID_NULL,
- PC_MSG_RECALL_LEASE_FAIL,
- PC_MSG_INODELK_CONTENTION_FAIL,
- PC_MSG_ENTRYLK_CONTENTION_FAIL
-);
+GLFS_MSGID(
+ PC, PC_MSG_TIMER_EXPIRED, PC_MSG_DIR_OP_FAILED, PC_MSG_FILE_OP_FAILED,
+ PC_MSG_TIMER_REG, PC_MSG_GRACE_TIMER_CANCELLED, PC_MSG_DICT_SET_FAILED,
+ PC_MSG_DICT_GET_FAILED, PC_MSG_NO_MEMORY, PC_MSG_RPC_CBK_FAILED,
+ PC_MSG_FUNCTION_CALL_ERROR, PC_MSG_RPC_INITED_ALREADY, PC_MSG_RPC_INIT,
+ PC_MSG_RPC_DESTROY, PC_MSG_RPC_INVALID_CALL, PC_MSG_INVALID_ENTRY,
+ PC_MSG_HANDSHAKE_RETURN, PC_MSG_CHILD_UP_NOTIFY_FAILED,
+ PC_MSG_CLIENT_DISCONNECTED, PC_MSG_CHILD_DOWN_NOTIFY_FAILED,
+ PC_MSG_PARENT_UP, PC_MSG_PARENT_DOWN, PC_MSG_RPC_INIT_FAILED,
+ PC_MSG_RPC_NOTIFY_FAILED, PC_MSG_FD_DUPLICATE_TRY, PC_MSG_FD_SET_FAIL,
+ PC_MSG_DICT_UNSERIALIZE_FAIL, PC_MSG_FD_GET_FAIL, PC_MSG_FD_CTX_INVALID,
+ PC_MSG_FOP_SEND_FAILED, PC_MSG_XDR_DECODING_FAILED, PC_MSG_REMOTE_OP_FAILED,
+ PC_MSG_RPC_STATUS_ERROR, PC_MSG_VOL_FILE_NOT_FOUND, PC_MSG_SEND_REQ_FAIL,
+ PC_MSG_LOCK_VERSION_SERVER, PC_MSG_SET_LK_VERSION_ERROR,
+ PC_MSG_LOCK_REQ_FAIL, PC_MSG_CLIENT_REQ_FAIL, PC_MSG_LOCK_ERROR,
+ PC_MSG_LOCK_REACQUIRE, PC_MSG_CHILD_UP_NOTIFY, PC_MSG_CHILD_UP_NOTIFY_DELAY,
+ PC_MSG_VOL_SET_FAIL, PC_MSG_SETVOLUME_FAIL, PC_MSG_VOLFILE_NOTIFY_FAILED,
+ PC_MSG_REMOTE_VOL_CONNECTED, PC_MSG_LOCK_MISMATCH, PC_MSG_LOCK_MATCH,
+ PC_MSG_AUTH_FAILED, PC_MSG_AUTH_FAILED_NOTIFY_FAILED,
+ PC_MSG_CHILD_CONNECTING_EVENT, PC_MSG_CHILD_CONNECTING_NOTIFY_FAILED,
+ PC_MSG_PROCESS_UUID_SET_FAIL, PC_MSG_DICT_ERROR, PC_MSG_DICT_SERIALIZE_FAIL,
+ PC_MSG_PGM_NOT_FOUND, PC_MSG_VERSION_INFO, PC_MSG_PORT_NUM_ERROR,
+ PC_MSG_VERSION_ERROR, PC_MSG_DIR_OP_SUCCESS, PC_MSG_BAD_FD,
+ PC_MSG_CLIENT_LOCK_INFO, PC_MSG_CACHE_INVALIDATION_FAIL,
+ PC_MSG_CHILD_STATUS, PC_MSG_GFID_NULL, PC_MSG_RECALL_LEASE_FAIL,
+ PC_MSG_INODELK_CONTENTION_FAIL, PC_MSG_ENTRYLK_CONTENTION_FAIL);
#endif /* !_PC_MESSAGES_H__ */
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index b72404f5639..c63e3a290d6 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -27,447 +27,460 @@
#include "client-messages.h"
/* FIXME: Needs to be defined in a common file */
-#define CLIENT_DUMP_LOCKS "trusted.glusterfs.clientlk-dump"
-#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB)
-#define GF_MIN_SOCKET_WINDOW_SIZE (0)
+#define CLIENT_DUMP_LOCKS "trusted.glusterfs.clientlk-dump"
+#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB)
+#define GF_MIN_SOCKET_WINDOW_SIZE (0)
typedef enum {
- DEFAULT_REMOTE_FD = 0,
- FALLBACK_TO_ANON_FD = 1
+ DEFAULT_REMOTE_FD = 0,
+ FALLBACK_TO_ANON_FD = 1
} clnt_remote_fd_flags_t;
-#define CPD_REQ_FIELD(v,f) (v)->compound_req_u.compound_##f##_req
-#define CPD_RSP_FIELD(v,f) (v)->compound_rsp_u.compound_##f##_rsp
-
-#define CLIENT_POST_FOP(fop, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u,fop); \
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
- params); \
- } while (0)
-
-#define CLIENT_POST_FOP_TYPE(fop, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u,fop);\
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
- params); \
- } while (0)
-
-#define CLIENT_PRE_FOP(fop, xl, compound_req, op_errno, label, params ...) \
- do { \
- gfs3_##fop##_req *_req = (gfs3_##fop##_req *) compound_req; \
- int _ret = 0; \
- \
- _ret = client_pre_##fop (xl, _req, params); \
- if (_ret < 0) { \
- op_errno = -ret; \
- goto label; \
- } \
- } while (0)
-
-#define CLIENT_COMPOUND_FOP_CLEANUP(curr_req, fop) \
- do { \
- gfs3_##fop##_req *_req = &CPD_REQ_FIELD(curr_req,fop); \
- \
- GF_FREE (_req->xdata.xdata_val); \
- } while (0)
-
-#define CLIENT_COMMON_RSP_CLEANUP(rsp, fop, i) \
- do { \
- compound_rsp *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i];\
- gf_common_rsp *_this_rsp = &CPD_RSP_FIELD (this_rsp, fop); \
- \
- free (_this_rsp->xdata.xdata_val); \
- } while (0)
-
-#define CLIENT_FOP_RSP_CLEANUP(rsp, fop, i) \
- do { \
- compound_rsp *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i];\
- gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD (this_rsp, fop); \
- \
- free (_this_rsp->xdata.xdata_val); \
- } while (0)
-
-#define CLIENT_GET_REMOTE_FD(xl, fd, flags, remote_fd, op_errno, label) \
- do { \
- int _ret = 0; \
- _ret = client_get_remote_fd (xl, fd, flags, &remote_fd);\
- if (_ret < 0) { \
- op_errno = errno; \
- goto label; \
- } \
- if (remote_fd == -1) { \
- gf_msg (xl->name, GF_LOG_WARNING, EBADFD, \
- PC_MSG_BAD_FD, " (%s) " \
- "remote_fd is -1. EBADFD", \
- uuid_utoa (fd->inode->gfid)); \
- op_errno = EBADFD; \
- goto label; \
- } \
- } while (0)
-
-#define CLIENT_STACK_UNWIND(op, frame, params ...) do { \
- if (!frame) \
- break; \
- clnt_local_t *__local = frame->local; \
- frame->local = NULL; \
- STACK_UNWIND_STRICT (op, frame, params); \
- client_local_wipe (__local); \
- } while (0)
+#define CPD_REQ_FIELD(v, f) (v)->compound_req_u.compound_##f##_req
+#define CPD_RSP_FIELD(v, f) (v)->compound_rsp_u.compound_##f##_rsp
+
+#define CLIENT_POST_FOP(fop, this_rsp_u, this_args_cbk, params...) \
+ do { \
+ gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u, fop); \
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno(_this_rsp->op_errno); \
+ args_##fop##_cbk_store(this_args_cbk, _op_ret, _op_errno, params); \
+ } while (0)
+
+#define CLIENT_POST_FOP_TYPE(fop, this_rsp_u, this_args_cbk, params...) \
+ do { \
+ gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp_u, fop); \
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno(_this_rsp->op_errno); \
+ args_##fop##_cbk_store(this_args_cbk, _op_ret, _op_errno, params); \
+ } while (0)
+
+#define CLIENT_PRE_FOP(fop, xl, compound_req, op_errno, label, params...) \
+ do { \
+ gfs3_##fop##_req *_req = (gfs3_##fop##_req *)compound_req; \
+ int _ret = 0; \
+ \
+ _ret = client_pre_##fop(xl, _req, params); \
+ if (_ret < 0) { \
+ op_errno = -ret; \
+ goto label; \
+ } \
+ } while (0)
+
+#define CLIENT_COMPOUND_FOP_CLEANUP(curr_req, fop) \
+ do { \
+ gfs3_##fop##_req *_req = &CPD_REQ_FIELD(curr_req, fop); \
+ \
+ GF_FREE(_req->xdata.xdata_val); \
+ } while (0)
+
+#define CLIENT_COMMON_RSP_CLEANUP(rsp, fop, i) \
+ do { \
+ compound_rsp *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
+ \
+ free(_this_rsp->xdata.xdata_val); \
+ } while (0)
+
+#define CLIENT_FOP_RSP_CLEANUP(rsp, fop, i) \
+ do { \
+ compound_rsp *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
+ \
+ free(_this_rsp->xdata.xdata_val); \
+ } while (0)
+
+#define CLIENT_GET_REMOTE_FD(xl, fd, flags, remote_fd, op_errno, label) \
+ do { \
+ int _ret = 0; \
+ _ret = client_get_remote_fd(xl, fd, flags, &remote_fd); \
+ if (_ret < 0) { \
+ op_errno = errno; \
+ goto label; \
+ } \
+ if (remote_fd == -1) { \
+ gf_msg(xl->name, GF_LOG_WARNING, EBADFD, PC_MSG_BAD_FD, \
+ " (%s) " \
+ "remote_fd is -1. EBADFD", \
+ uuid_utoa(fd->inode->gfid)); \
+ op_errno = EBADFD; \
+ goto label; \
+ } \
+ } while (0)
+
+#define CLIENT_STACK_UNWIND(op, frame, params...) \
+ do { \
+ if (!frame) \
+ break; \
+ clnt_local_t *__local = frame->local; \
+ frame->local = NULL; \
+ STACK_UNWIND_STRICT(op, frame, params); \
+ client_local_wipe(__local); \
+ } while (0)
/* compound v2 */
-#define CPD4_REQ_FIELD(v, f) ((v)->compound_req_v2_u.compound_##f##_req)
-#define CPD4_RSP_FIELD(v, f) ((v)->compound_rsp_v2_u.compound_##f##_rsp)
-
-#define CLIENT4_POST_FOP(fop, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gfx_common_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp_u, fop); \
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
- params); \
- } while (0)
-
-#define CLIENT4_POST_FOP_TYPE(fop, rsp_type, this_rsp_u, this_args_cbk, params ...) \
- do { \
- gfx_##rsp_type##_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp_u, fop); \
- int _op_ret = 0; \
- int _op_errno = 0; \
- \
- _op_ret = _this_rsp->op_ret; \
- _op_errno = gf_error_to_errno (_this_rsp->op_errno); \
- args_##fop##_cbk_store (this_args_cbk, _op_ret, _op_errno, \
- params); \
- } while (0)
-
-#define CLIENT4_PRE_FOP(fop, xl, compound_req, op_errno, label, params ...) \
- do { \
- gfx_##fop##_req *_req = (gfx_##fop##_req *)compound_req; \
- int _ret = 0; \
- \
- _ret = client_pre_##fop##_v2 (xl, _req, params); \
- if (_ret < 0) { \
- op_errno = -ret; \
- goto label; \
- } \
- } while (0)
-
-#define CLIENT4_COMPOUND_FOP_CLEANUP(curr_req, fop) \
- do { \
- gfx_##fop##_req *_req = &CPD4_REQ_FIELD(curr_req, fop); \
- \
- GF_FREE (_req->xdata.pairs.pairs_val); \
- } while (0)
-
-
+#define CPD4_REQ_FIELD(v, f) ((v)->compound_req_v2_u.compound_##f##_req)
+#define CPD4_RSP_FIELD(v, f) ((v)->compound_rsp_v2_u.compound_##f##_rsp)
+
+#define CLIENT4_POST_FOP(fop, this_rsp_u, this_args_cbk, params...) \
+ do { \
+ gfx_common_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp_u, fop); \
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno(_this_rsp->op_errno); \
+ args_##fop##_cbk_store(this_args_cbk, _op_ret, _op_errno, params); \
+ } while (0)
+
+#define CLIENT4_POST_FOP_TYPE(fop, rsp_type, this_rsp_u, this_args_cbk, \
+ params...) \
+ do { \
+ gfx_##rsp_type##_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp_u, fop); \
+ int _op_ret = 0; \
+ int _op_errno = 0; \
+ \
+ _op_ret = _this_rsp->op_ret; \
+ _op_errno = gf_error_to_errno(_this_rsp->op_errno); \
+ args_##fop##_cbk_store(this_args_cbk, _op_ret, _op_errno, params); \
+ } while (0)
+
+#define CLIENT4_PRE_FOP(fop, xl, compound_req, op_errno, label, params...) \
+ do { \
+ gfx_##fop##_req *_req = (gfx_##fop##_req *)compound_req; \
+ int _ret = 0; \
+ \
+ _ret = client_pre_##fop##_v2(xl, _req, params); \
+ if (_ret < 0) { \
+ op_errno = -ret; \
+ goto label; \
+ } \
+ } while (0)
+
+#define CLIENT4_COMPOUND_FOP_CLEANUP(curr_req, fop) \
+ do { \
+ gfx_##fop##_req *_req = &CPD4_REQ_FIELD(curr_req, fop); \
+ \
+ GF_FREE(_req->xdata.pairs.pairs_val); \
+ } while (0)
struct clnt_options {
- char *remote_subvolume;
- int ping_timeout;
+ char *remote_subvolume;
+ int ping_timeout;
};
typedef struct clnt_conf {
- struct rpc_clnt *rpc;
- struct clnt_options opt;
- struct rpc_clnt_config rpc_conf;
- struct list_head saved_fds;
- pthread_spinlock_t fd_lock; /* protects saved_fds list
- * and all fdctx */
- pthread_mutex_t lock;
- int connected;
-
- rpc_clnt_prog_t *fops;
- rpc_clnt_prog_t *mgmt;
- rpc_clnt_prog_t *handshake;
- rpc_clnt_prog_t *dump;
-
- int client_id;
- uint64_t reopen_fd_count; /* Count of fds reopened after a
- connection is established */
- gf_lock_t rec_lock;
- int skip_notify;
-
- int last_sent_event; /* Flag used to make sure we are
- not repeating the same event
- which was sent earlier */
- char portmap_err_logged; /* flag used to prevent
- excessive logging */
- char disconnect_err_logged; /* flag used to prevent
- excessive disconnect
- logging */
- char parent_down;
- gf_boolean_t quick_reconnect; /* When reconnecting after
- portmap query, do not let
- the reconnection happen after
- the usual 3-second wait
- */
- gf_boolean_t filter_o_direct; /* if set, filter O_DIRECT from
- the flags list of open() */
- /* set volume is the op which results in creating/re-using
- * the conn-id and is called once per connection, this remembers
- * how manytimes set_volume is called
- */
- uint64_t setvol_count;
-
- gf_boolean_t send_gids; /* let the server resolve gids */
-
- int event_threads; /* # of event threads
- * configured */
-
- gf_boolean_t destroy; /* if enabled implies fini was called
- * on @this xlator instance */
-
- gf_boolean_t child_up; /* Set to true, when child is up, and
- * false, when child is down */
-
- gf_boolean_t can_log_disconnect; /* socket level connection is
- * up, disconnects can be
- * logged
- */
+ struct rpc_clnt *rpc;
+ struct clnt_options opt;
+ struct rpc_clnt_config rpc_conf;
+ struct list_head saved_fds;
+ pthread_spinlock_t fd_lock; /* protects saved_fds list
+ * and all fdctx */
+ pthread_mutex_t lock;
+ int connected;
+
+ rpc_clnt_prog_t *fops;
+ rpc_clnt_prog_t *mgmt;
+ rpc_clnt_prog_t *handshake;
+ rpc_clnt_prog_t *dump;
+
+ int client_id;
+ uint64_t reopen_fd_count; /* Count of fds reopened after a
+ connection is established */
+ gf_lock_t rec_lock;
+ int skip_notify;
+
+ int last_sent_event; /* Flag used to make sure we are
+ not repeating the same event
+ which was sent earlier */
+ char portmap_err_logged; /* flag used to prevent
+ excessive logging */
+ char disconnect_err_logged; /* flag used to prevent
+ excessive disconnect
+ logging */
+ char parent_down;
+ gf_boolean_t quick_reconnect; /* When reconnecting after
+ portmap query, do not let
+ the reconnection happen after
+ the usual 3-second wait
+ */
+ gf_boolean_t filter_o_direct; /* if set, filter O_DIRECT from
+ the flags list of open() */
+ /* set volume is the op which results in creating/re-using
+ * the conn-id and is called once per connection, this remembers
+ * how manytimes set_volume is called
+ */
+ uint64_t setvol_count;
+
+ gf_boolean_t send_gids; /* let the server resolve gids */
+
+ int event_threads; /* # of event threads
+ * configured */
+
+ gf_boolean_t destroy; /* if enabled implies fini was called
+ * on @this xlator instance */
+
+ gf_boolean_t child_up; /* Set to true, when child is up, and
+ * false, when child is down */
+
+ gf_boolean_t can_log_disconnect; /* socket level connection is
+ * up, disconnects can be
+ * logged
+ */
} clnt_conf_t;
typedef struct _client_fd_ctx {
- struct list_head sfd_pos; /* Stores the reference to this
- fd's position in the saved_fds list.
- */
- int64_t remote_fd;
- char is_dir;
- char released;
- int32_t flags;
- fd_lk_ctx_t *lk_ctx;
- uuid_t gfid;
- void (*reopen_done)(struct _client_fd_ctx*, int64_t rfd, xlator_t *);
- struct list_head lock_list; /* List of all granted locks on this fd */
- int32_t reopen_attempts;
+ struct list_head sfd_pos; /* Stores the reference to this
+ fd's position in the saved_fds list.
+ */
+ int64_t remote_fd;
+ char is_dir;
+ char released;
+ int32_t flags;
+ fd_lk_ctx_t *lk_ctx;
+ uuid_t gfid;
+ void (*reopen_done)(struct _client_fd_ctx *, int64_t rfd, xlator_t *);
+ struct list_head lock_list; /* List of all granted locks on this fd */
+ int32_t reopen_attempts;
} clnt_fd_ctx_t;
typedef struct _client_posix_lock {
- fd_t *fd; /* The fd on which the lk operation was made */
-
- struct gf_flock user_flock; /* the flock supplied by the user */
- off_t fl_start;
- off_t fl_end;
- short fl_type;
- int32_t cmd; /* the cmd for the lock call */
- gf_lkowner_t owner; /* lock owner from fuse */
- struct list_head list; /* reference used to add to the fdctx list of locks */
+ fd_t *fd; /* The fd on which the lk operation was made */
+
+ struct gf_flock user_flock; /* the flock supplied by the user */
+ off_t fl_start;
+ off_t fl_end;
+ short fl_type;
+ int32_t cmd; /* the cmd for the lock call */
+ gf_lkowner_t owner; /* lock owner from fuse */
+ struct list_head
+ list; /* reference used to add to the fdctx list of locks */
} client_posix_lock_t;
typedef struct client_local {
- loc_t loc;
- loc_t loc2;
- fd_t *fd;
- clnt_fd_ctx_t *fdctx;
- uint32_t flags;
- struct iobref *iobref;
-
- client_posix_lock_t *client_lock;
- gf_lkowner_t owner;
- int32_t cmd;
- struct list_head lock_list;
- pthread_mutex_t mutex;
- char *name;
- gf_boolean_t attempt_reopen;
- /* required for compound fops */
- compound_args_t *compound_args;
- unsigned int length; /* length of a compound fop */
- unsigned int read_length; /* defines the last processed length for a compound read */
+ loc_t loc;
+ loc_t loc2;
+ fd_t *fd;
+ clnt_fd_ctx_t *fdctx;
+ uint32_t flags;
+ struct iobref *iobref;
+
+ client_posix_lock_t *client_lock;
+ gf_lkowner_t owner;
+ int32_t cmd;
+ struct list_head lock_list;
+ pthread_mutex_t mutex;
+ char *name;
+ gf_boolean_t attempt_reopen;
+ /* required for compound fops */
+ compound_args_t *compound_args;
+ unsigned int length; /* length of a compound fop */
+ unsigned int
+ read_length; /* defines the last processed length for a compound read */
} clnt_local_t;
typedef struct client_args {
- loc_t *loc;
- fd_t *fd;
- const char *linkname;
- struct iobref *iobref;
- struct iovec *vector;
- dict_t *xattr;
- struct iatt *stbuf;
- loc_t *oldloc;
- loc_t *newloc;
- const char *name;
- struct gf_flock *flock;
- const char *volume;
- const char *basename;
- off_t offset;
- int32_t mask;
- int32_t cmd;
- size_t size;
- mode_t mode;
- dev_t rdev;
- int32_t flags;
- int32_t count;
- int32_t datasync;
- entrylk_cmd cmd_entrylk;
- entrylk_type type;
- gf_xattrop_flags_t optype;
- int32_t valid;
- int32_t len;
- gf_seek_what_t what;
- struct gf_lease *lease;
-
- mode_t umask;
- dict_t *xdata;
- lock_migration_info_t *locklist;
+ loc_t *loc;
+ fd_t *fd;
+ const char *linkname;
+ struct iobref *iobref;
+ struct iovec *vector;
+ dict_t *xattr;
+ struct iatt *stbuf;
+ loc_t *oldloc;
+ loc_t *newloc;
+ const char *name;
+ struct gf_flock *flock;
+ const char *volume;
+ const char *basename;
+ off_t offset;
+ int32_t mask;
+ int32_t cmd;
+ size_t size;
+ mode_t mode;
+ dev_t rdev;
+ int32_t flags;
+ int32_t count;
+ int32_t datasync;
+ entrylk_cmd cmd_entrylk;
+ entrylk_type type;
+ gf_xattrop_flags_t optype;
+ int32_t valid;
+ int32_t len;
+ gf_seek_what_t what;
+ struct gf_lease *lease;
+
+ mode_t umask;
+ dict_t *xdata;
+ lock_migration_info_t *locklist;
} clnt_args_t;
-typedef ssize_t (*gfs_serialize_t) (struct iovec outmsg, void *args);
+typedef ssize_t (*gfs_serialize_t)(struct iovec outmsg, void *args);
+
+clnt_fd_ctx_t *
+this_fd_get_ctx(fd_t *file, xlator_t *this);
+clnt_fd_ctx_t *
+this_fd_del_ctx(fd_t *file, xlator_t *this);
+void
+this_fd_set_ctx(fd_t *file, xlator_t *this, loc_t *loc, clnt_fd_ctx_t *ctx);
-clnt_fd_ctx_t *this_fd_get_ctx (fd_t *file, xlator_t *this);
-clnt_fd_ctx_t *this_fd_del_ctx (fd_t *file, xlator_t *this);
-void this_fd_set_ctx (fd_t *file, xlator_t *this, loc_t *loc,
- clnt_fd_ctx_t *ctx);
+int
+client_local_wipe(clnt_local_t *local);
+int
+client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
+ rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbk,
+ struct iobref *iobref, struct iovec *rsphdr,
+ int rsphdr_count, struct iovec *rsp_payload,
+ int rsp_count, struct iobref *rsp_iobref,
+ xdrproc_t xdrproc);
-int client_local_wipe (clnt_local_t *local);
-int client_submit_request (xlator_t *this, void *req,
- call_frame_t *frame, rpc_clnt_prog_t *prog,
- int procnum, fop_cbk_fn_t cbk,
- struct iobref *iobref,
- struct iovec *rsphdr, int rsphdr_count,
- struct iovec *rsp_payload, int rsp_count,
- struct iobref *rsp_iobref, xdrproc_t xdrproc);
+int
+client_submit_compound_request(xlator_t *this, void *req, call_frame_t *frame,
+ rpc_clnt_prog_t *prog, int procnum,
+ fop_cbk_fn_t cbkfn, struct iovec *req_vector,
+ int req_count, struct iobref *iobref,
+ struct iovec *rsphdr, int rsphdr_count,
+ struct iovec *rsp_payload, int rsp_payload_count,
+ struct iobref *rsp_iobref, xdrproc_t xdrproc);
int
-client_submit_compound_request (xlator_t *this, void *req, call_frame_t *frame,
- rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbkfn,
- struct iovec *req_vector, int req_count,
- struct iobref *iobref, struct iovec *rsphdr,
- int rsphdr_count, struct iovec *rsp_payload,
- int rsp_payload_count, struct iobref *rsp_iobref,
- xdrproc_t xdrproc);
-
-int unserialize_rsp_dirent (xlator_t *this, struct gfs3_readdir_rsp *rsp,
- gf_dirent_t *entries);
-int unserialize_rsp_direntp (xlator_t *this, fd_t *fd,
- struct gfs3_readdirp_rsp *rsp, gf_dirent_t *entries);
-
-int clnt_readdir_rsp_cleanup (gfs3_readdir_rsp *rsp);
-int clnt_readdirp_rsp_cleanup (gfs3_readdirp_rsp *rsp);
-int client_attempt_lock_recovery (xlator_t *this, clnt_fd_ctx_t *fdctx);
-int32_t delete_granted_locks_owner (fd_t *fd, gf_lkowner_t *owner);
-int32_t delete_granted_locks_fd (clnt_fd_ctx_t *fdctx);
-int32_t client_cmd_to_gf_cmd (int32_t cmd, int32_t *gf_cmd);
-void client_save_number_fds (clnt_conf_t *conf, int count);
-int dump_client_locks (inode_t *inode);
-int client_notify_parents_child_up (xlator_t *this);
-int32_t is_client_dump_locks_cmd (char *name);
-int32_t client_dump_locks (char *name, inode_t *inode,
- dict_t *dict);
-int client_fdctx_destroy (xlator_t *this, clnt_fd_ctx_t *fdctx);
-
-int32_t client_type_to_gf_type (short l_type);
-
-int client_mark_fd_bad (xlator_t *this);
-
-int client_fd_lk_list_empty (fd_lk_ctx_t *lk_ctx, gf_boolean_t use_try_lock);
-void client_default_reopen_done (clnt_fd_ctx_t *fdctx, int64_t rfd,
- xlator_t *this);
-void client_attempt_reopen (fd_t *fd, xlator_t *this);
-int client_get_remote_fd (xlator_t *this, fd_t *fd, int flags,
- int64_t *remote_fd);
-int client_fd_fop_prepare_local (call_frame_t *frame, fd_t *fd,
- int64_t remote_fd);
+unserialize_rsp_dirent(xlator_t *this, struct gfs3_readdir_rsp *rsp,
+ gf_dirent_t *entries);
+int
+unserialize_rsp_direntp(xlator_t *this, fd_t *fd, struct gfs3_readdirp_rsp *rsp,
+ gf_dirent_t *entries);
+
+int
+clnt_readdir_rsp_cleanup(gfs3_readdir_rsp *rsp);
+int
+clnt_readdirp_rsp_cleanup(gfs3_readdirp_rsp *rsp);
+int
+client_attempt_lock_recovery(xlator_t *this, clnt_fd_ctx_t *fdctx);
+int32_t
+delete_granted_locks_owner(fd_t *fd, gf_lkowner_t *owner);
+int32_t
+delete_granted_locks_fd(clnt_fd_ctx_t *fdctx);
+int32_t
+client_cmd_to_gf_cmd(int32_t cmd, int32_t *gf_cmd);
+void
+client_save_number_fds(clnt_conf_t *conf, int count);
+int
+dump_client_locks(inode_t *inode);
+int
+client_notify_parents_child_up(xlator_t *this);
+int32_t
+is_client_dump_locks_cmd(char *name);
+int32_t
+client_dump_locks(char *name, inode_t *inode, dict_t *dict);
+int
+client_fdctx_destroy(xlator_t *this, clnt_fd_ctx_t *fdctx);
+
+int32_t
+client_type_to_gf_type(short l_type);
+
+int
+client_mark_fd_bad(xlator_t *this);
+
+int
+client_fd_lk_list_empty(fd_lk_ctx_t *lk_ctx, gf_boolean_t use_try_lock);
+void
+client_default_reopen_done(clnt_fd_ctx_t *fdctx, int64_t rfd, xlator_t *this);
+void
+client_attempt_reopen(fd_t *fd, xlator_t *this);
+int
+client_get_remote_fd(xlator_t *this, fd_t *fd, int flags, int64_t *remote_fd);
+int
+client_fd_fop_prepare_local(call_frame_t *frame, fd_t *fd, int64_t remote_fd);
gf_boolean_t
-__is_fd_reopen_in_progress (clnt_fd_ctx_t *fdctx);
+__is_fd_reopen_in_progress(clnt_fd_ctx_t *fdctx);
int
-client_notify_dispatch (xlator_t *this, int32_t event, void *data, ...);
+client_notify_dispatch(xlator_t *this, int32_t event, void *data, ...);
int
-client_notify_dispatch_uniq (xlator_t *this, int32_t event, void *data, ...);
+client_notify_dispatch_uniq(xlator_t *this, int32_t event, void *data, ...);
gf_boolean_t
-client_is_reopen_needed (fd_t *fd, xlator_t *this, int64_t remote_fd);
+client_is_reopen_needed(fd_t *fd, xlator_t *this, int64_t remote_fd);
int
-client_add_fd_to_saved_fds (xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
- int64_t remote_fd, int is_dir);
+client_add_fd_to_saved_fds(xlator_t *this, fd_t *fd, loc_t *loc, int32_t flags,
+ int64_t remote_fd, int is_dir);
int
-client_handle_fop_requirements (xlator_t *this, call_frame_t *frame,
- gfs3_compound_req *req,
- clnt_local_t *local,
- struct iobref **req_iobref,
- struct iobref **rsp_iobref,
- struct iovec *req_vector,
- struct iovec *rsp_vector, int *req_count,
- int *rsp_count, default_args_t *args,
- int fop_enum, int index);
+client_handle_fop_requirements(
+ xlator_t *this, call_frame_t *frame, gfs3_compound_req *req,
+ clnt_local_t *local, struct iobref **req_iobref, struct iobref **rsp_iobref,
+ struct iovec *req_vector, struct iovec *rsp_vector, int *req_count,
+ int *rsp_count, default_args_t *args, int fop_enum, int index);
int
-client_process_response (call_frame_t *frame, xlator_t *this,
- struct rpc_req *req,
- gfs3_compound_rsp *rsp, compound_args_cbk_t *args_cbk,
- int index);
+client_process_response(call_frame_t *frame, xlator_t *this,
+ struct rpc_req *req, gfs3_compound_rsp *rsp,
+ compound_args_cbk_t *args_cbk, int index);
void
-compound_request_cleanup (gfs3_compound_req *req);
+compound_request_cleanup(gfs3_compound_req *req);
int
-clnt_unserialize_rsp_locklist (xlator_t *this, struct gfs3_getactivelk_rsp *rsp,
- lock_migration_info_t *lmi);
+clnt_unserialize_rsp_locklist(xlator_t *this, struct gfs3_getactivelk_rsp *rsp,
+ lock_migration_info_t *lmi);
void
-clnt_getactivelk_rsp_cleanup (gfs3_getactivelk_rsp *rsp);
+clnt_getactivelk_rsp_cleanup(gfs3_getactivelk_rsp *rsp);
void
-clnt_setactivelk_req_cleanup (gfs3_setactivelk_req *req);
+clnt_setactivelk_req_cleanup(gfs3_setactivelk_req *req);
int
-serialize_req_locklist (lock_migration_info_t *locklist,
- gfs3_setactivelk_req *req);
+serialize_req_locklist(lock_migration_info_t *locklist,
+ gfs3_setactivelk_req *req);
void
-client_compound_rsp_cleanup (gfs3_compound_rsp *rsp, int len);
+client_compound_rsp_cleanup(gfs3_compound_rsp *rsp, int len);
void
-clnt_getactivelk_rsp_cleanup_v2 (gfx_getactivelk_rsp *rsp);
+clnt_getactivelk_rsp_cleanup_v2(gfx_getactivelk_rsp *rsp);
void
-clnt_setactivelk_req_cleanup_v2 (gfx_setactivelk_req *req);
+clnt_setactivelk_req_cleanup_v2(gfx_setactivelk_req *req);
int
-serialize_req_locklist_v2 (lock_migration_info_t *locklist,
- gfx_setactivelk_req *req);
+serialize_req_locklist_v2(lock_migration_info_t *locklist,
+ gfx_setactivelk_req *req);
int
-clnt_unserialize_rsp_locklist_v2 (xlator_t *this, struct gfx_getactivelk_rsp *rsp,
- lock_migration_info_t *lmi);
+clnt_unserialize_rsp_locklist_v2(xlator_t *this,
+ struct gfx_getactivelk_rsp *rsp,
+ lock_migration_info_t *lmi);
-int unserialize_rsp_dirent_v2 (xlator_t *this, struct gfx_readdir_rsp *rsp,
- gf_dirent_t *entries);
-int unserialize_rsp_direntp_v2 (xlator_t *this, fd_t *fd,
- struct gfx_readdirp_rsp *rsp, gf_dirent_t *entries);
+int
+unserialize_rsp_dirent_v2(xlator_t *this, struct gfx_readdir_rsp *rsp,
+ gf_dirent_t *entries);
+int
+unserialize_rsp_direntp_v2(xlator_t *this, fd_t *fd,
+ struct gfx_readdirp_rsp *rsp, gf_dirent_t *entries);
-int clnt_readdir_rsp_cleanup_v2 (gfx_readdir_rsp *rsp);
-int clnt_readdirp_rsp_cleanup_v2 (gfx_readdirp_rsp *rsp);
+int
+clnt_readdir_rsp_cleanup_v2(gfx_readdir_rsp *rsp);
+int
+clnt_readdirp_rsp_cleanup_v2(gfx_readdirp_rsp *rsp);
int
-client_handle_fop_requirements_v2 (xlator_t *this, call_frame_t *frame,
- gfx_compound_req *req,
- clnt_local_t *local,
- struct iobref **req_iobref,
- struct iobref **rsp_iobref,
- struct iovec *req_vector,
- struct iovec *rsp_vector, int *req_count,
- int *rsp_count, default_args_t *args,
- int fop_enum, int index);
+client_handle_fop_requirements_v2(
+ xlator_t *this, call_frame_t *frame, gfx_compound_req *req,
+ clnt_local_t *local, struct iobref **req_iobref, struct iobref **rsp_iobref,
+ struct iovec *req_vector, struct iovec *rsp_vector, int *req_count,
+ int *rsp_count, default_args_t *args, int fop_enum, int index);
int
-client_process_response_v2 (call_frame_t *frame, xlator_t *this,
- struct rpc_req *req,
- gfx_compound_rsp *rsp, compound_args_cbk_t *args_cbk,
- int index);
+client_process_response_v2(call_frame_t *frame, xlator_t *this,
+ struct rpc_req *req, gfx_compound_rsp *rsp,
+ compound_args_cbk_t *args_cbk, int index);
void
-compound_request_cleanup_v2 (gfx_compound_req *req);
+compound_request_cleanup_v2(gfx_compound_req *req);
void
-client_compound_rsp_cleanup_v2 (gfx_compound_rsp *rsp, int len);
+client_compound_rsp_cleanup_v2(gfx_compound_rsp *rsp, int len);
#endif /* !_CLIENT_H */
diff --git a/xlators/protocol/server/src/authenticate.h b/xlators/protocol/server/src/authenticate.h
index 5f92183fb12..6fc53933343 100644
--- a/xlators/protocol/server/src/authenticate.h
+++ b/xlators/protocol/server/src/authenticate.h
@@ -22,23 +22,21 @@
#include "list.h"
#include "xlator.h"
-typedef enum {
- AUTH_ACCEPT,
- AUTH_REJECT,
- AUTH_DONT_CARE
-} auth_result_t;
+typedef enum { AUTH_ACCEPT, AUTH_REJECT, AUTH_DONT_CARE } auth_result_t;
-typedef auth_result_t (*auth_fn_t) (dict_t *input_params,
- dict_t *config_params);
+typedef auth_result_t (*auth_fn_t)(dict_t *input_params, dict_t *config_params);
typedef struct {
- void *handle;
- auth_fn_t authenticate;
- volume_opt_list_t *vol_opt;
+ void *handle;
+ auth_fn_t authenticate;
+ volume_opt_list_t *vol_opt;
} auth_handle_t;
-int32_t gf_auth_init (xlator_t *xl, dict_t *auth_modules);
-void gf_auth_fini (dict_t *auth_modules);
-auth_result_t gf_authenticate (dict_t *, dict_t *, dict_t *);
+int32_t
+gf_auth_init(xlator_t *xl, dict_t *auth_modules);
+void
+gf_auth_fini(dict_t *auth_modules);
+auth_result_t
+gf_authenticate(dict_t *, dict_t *, dict_t *);
#endif /* _AUTHENTICATE_H */
diff --git a/xlators/protocol/server/src/server-common.h b/xlators/protocol/server/src/server-common.h
index e272235a192..53e46afdc69 100644
--- a/xlators/protocol/server/src/server-common.h
+++ b/xlators/protocol/server/src/server-common.h
@@ -9,200 +9,186 @@
#include "xdr-nfs3.h"
void
-server_post_stat (server_state_t *state,
- gfs3_stat_rsp *rsp, struct iatt *stbuf);
+server_post_stat(server_state_t *state, gfs3_stat_rsp *rsp, struct iatt *stbuf);
void
-server_post_readlink (gfs3_readlink_rsp *rsp, struct iatt *stbuf,
- const char *buf);
+server_post_readlink(gfs3_readlink_rsp *rsp, struct iatt *stbuf,
+ const char *buf);
void
-server_post_mknod (server_state_t *state, gfs3_mknod_rsp *rsp,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent, inode_t *inode);
+server_post_mknod(server_state_t *state, gfs3_mknod_rsp *rsp,
+ struct iatt *stbuf, struct iatt *preparent,
+ struct iatt *postparent, inode_t *inode);
void
-server_post_mkdir (server_state_t *state, gfs3_mkdir_rsp *rsp,
- inode_t *inode,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent, dict_t *xdata);
+server_post_mkdir(server_state_t *state, gfs3_mkdir_rsp *rsp, inode_t *inode,
+ struct iatt *stbuf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata);
void
-server_post_unlink (server_state_t *state, gfs3_unlink_rsp *rsp,
- struct iatt *preparent, struct iatt *postparent);
+server_post_unlink(server_state_t *state, gfs3_unlink_rsp *rsp,
+ struct iatt *preparent, struct iatt *postparent);
void
-server_post_rmdir (server_state_t *state, gfs3_rmdir_rsp *rsp,
- struct iatt *preparent, struct iatt *postparent);
+server_post_rmdir(server_state_t *state, gfs3_rmdir_rsp *rsp,
+ struct iatt *preparent, struct iatt *postparent);
void
-server_post_symlink (server_state_t *state, gfs3_symlink_rsp *rsp,
- inode_t *inode,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent, dict_t *xdata);
+server_post_symlink(server_state_t *state, gfs3_symlink_rsp *rsp,
+ inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata);
void
-server_post_link (server_state_t *state, gfs3_link_rsp *rsp,
- inode_t *inode,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent, dict_t *xdata);
+server_post_link(server_state_t *state, gfs3_link_rsp *rsp, inode_t *inode,
+ struct iatt *stbuf, struct iatt *preparent,
+ struct iatt *postparent, dict_t *xdata);
void
-server_post_truncate (gfs3_truncate_rsp *rsp, struct iatt *prebuf,
- struct iatt *postbuf);
+server_post_truncate(gfs3_truncate_rsp *rsp, struct iatt *prebuf,
+ struct iatt *postbuf);
void
-server_post_writev (gfs3_write_rsp *rsp, struct iatt *prebuf,
- struct iatt *postbuf);
+server_post_writev(gfs3_write_rsp *rsp, struct iatt *prebuf,
+ struct iatt *postbuf);
void
-server_post_statfs (gfs3_statfs_rsp *rsp, struct statvfs *stbuf);
+server_post_statfs(gfs3_statfs_rsp *rsp, struct statvfs *stbuf);
void
-server_post_fsync (gfs3_fsync_rsp *rsp, struct iatt *prebuf,
- struct iatt *postbuf);
+server_post_fsync(gfs3_fsync_rsp *rsp, struct iatt *prebuf,
+ struct iatt *postbuf);
void
-server_post_ftruncate (gfs3_ftruncate_rsp *rsp, struct iatt *prebuf,
+server_post_ftruncate(gfs3_ftruncate_rsp *rsp, struct iatt *prebuf,
struct iatt *postbuf);
void
-server_post_fstat (server_state_t *state,
- gfs3_fstat_rsp *rsp, struct iatt *stbuf);
+server_post_fstat(server_state_t *state, gfs3_fstat_rsp *rsp,
+ struct iatt *stbuf);
void
-server_post_lk (xlator_t *this, gfs3_lk_rsp *rsp, struct gf_flock *lock);
+server_post_lk(xlator_t *this, gfs3_lk_rsp *rsp, struct gf_flock *lock);
int
-server_post_readdir (gfs3_readdir_rsp *rsp, gf_dirent_t *entries);
+server_post_readdir(gfs3_readdir_rsp *rsp, gf_dirent_t *entries);
void
-server_post_zerofill (gfs3_zerofill_rsp *rsp, struct iatt *statpre,
- struct iatt *statpost);
+server_post_zerofill(gfs3_zerofill_rsp *rsp, struct iatt *statpre,
+ struct iatt *statpost);
void
-server_post_discard (gfs3_discard_rsp *rsp, struct iatt *statpre,
- struct iatt *statpost);
+server_post_discard(gfs3_discard_rsp *rsp, struct iatt *statpre,
+ struct iatt *statpost);
void
-server_post_fallocate (gfs3_fallocate_rsp *rsp, struct iatt *statpre,
- struct iatt *statpost);
+server_post_fallocate(gfs3_fallocate_rsp *rsp, struct iatt *statpre,
+ struct iatt *statpost);
void
-server_post_seek (gfs3_seek_rsp *rsp, off_t offset);
+server_post_seek(gfs3_seek_rsp *rsp, off_t offset);
int
-server_post_readdirp (gfs3_readdirp_rsp *rsp, gf_dirent_t *entries);
+server_post_readdirp(gfs3_readdirp_rsp *rsp, gf_dirent_t *entries);
void
-server_post_fsetattr (gfs3_fsetattr_rsp *rsp, struct iatt *statpre,
- struct iatt *statpost);
+server_post_fsetattr(gfs3_fsetattr_rsp *rsp, struct iatt *statpre,
+ struct iatt *statpost);
void
-server_post_setattr (gfs3_setattr_rsp *rsp, struct iatt *statpre,
- struct iatt *statpost);
+server_post_setattr(gfs3_setattr_rsp *rsp, struct iatt *statpre,
+ struct iatt *statpost);
void
-server_post_rchecksum (gfs3_rchecksum_rsp *rsp, uint32_t weak_checksum,
- uint8_t *strong_checksum);
+server_post_rchecksum(gfs3_rchecksum_rsp *rsp, uint32_t weak_checksum,
+ uint8_t *strong_checksum);
void
-server_post_rename (call_frame_t *frame, server_state_t *state,
- gfs3_rename_rsp *rsp,
- struct iatt *stbuf,
- struct iatt *preoldparent,
- struct iatt *postoldparent,
- struct iatt *prenewparent,
- struct iatt *postnewparent);
+server_post_rename(call_frame_t *frame, server_state_t *state,
+ gfs3_rename_rsp *rsp, struct iatt *stbuf,
+ struct iatt *preoldparent, struct iatt *postoldparent,
+ struct iatt *prenewparent, struct iatt *postnewparent);
int
-server_post_open (call_frame_t *frame, xlator_t *this,
- gfs3_open_rsp *rsp, fd_t *fd);
+server_post_open(call_frame_t *frame, xlator_t *this, gfs3_open_rsp *rsp,
+ fd_t *fd);
void
-server_post_readv (gfs3_read_rsp *rsp, struct iatt *stbuf, int op_ret);
+server_post_readv(gfs3_read_rsp *rsp, struct iatt *stbuf, int op_ret);
int
-server_post_opendir (call_frame_t *frame, xlator_t *this,
- gfs3_opendir_rsp *rsp, fd_t *fd);
+server_post_opendir(call_frame_t *frame, xlator_t *this, gfs3_opendir_rsp *rsp,
+ fd_t *fd);
int
-server_post_create (call_frame_t *frame, gfs3_create_rsp *rsp,
- server_state_t *state,
- xlator_t *this, fd_t *fd, inode_t *inode,
- struct iatt *stbuf, struct iatt *preparent,
- struct iatt *postparent);
+server_post_create(call_frame_t *frame, gfs3_create_rsp *rsp,
+ server_state_t *state, xlator_t *this, fd_t *fd,
+ inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
+ struct iatt *postparent);
void
-server_post_lookup (gfs3_lookup_rsp *rsp, call_frame_t *frame,
- server_state_t *state,
- inode_t *inode, struct iatt *stbuf,
- struct iatt *postparent);
+server_post_lookup(gfs3_lookup_rsp *rsp, call_frame_t *frame,
+ server_state_t *state, inode_t *inode, struct iatt *stbuf,
+ struct iatt *postparent);
void
-server_post_lease (gfs3_lease_rsp *rsp, struct gf_lease *lease);
+server_post_lease(gfs3_lease_rsp *rsp, struct gf_lease *lease);
void
-server4_post_readlink (gfx_readlink_rsp *rsp, struct iatt *stbuf,
+server4_post_readlink(gfx_readlink_rsp *rsp, struct iatt *stbuf,
const char *buf);
void
-server4_post_statfs (gfx_statfs_rsp *rsp, struct statvfs *stbuf);
+server4_post_statfs(gfx_statfs_rsp *rsp, struct statvfs *stbuf);
void
-server4_post_lk (xlator_t *this, gfx_lk_rsp *rsp, struct gf_flock *lock);
+server4_post_lk(xlator_t *this, gfx_lk_rsp *rsp, struct gf_flock *lock);
int
-server4_post_readdir (gfx_readdir_rsp *rsp, gf_dirent_t *entries);
+server4_post_readdir(gfx_readdir_rsp *rsp, gf_dirent_t *entries);
void
-server4_post_seek (gfx_seek_rsp *rsp, off_t offset);
+server4_post_seek(gfx_seek_rsp *rsp, off_t offset);
int
-server4_post_readdirp (gfx_readdirp_rsp *rsp, gf_dirent_t *entries);
+server4_post_readdirp(gfx_readdirp_rsp *rsp, gf_dirent_t *entries);
void
-server4_post_rchecksum (gfx_rchecksum_rsp *rsp, uint32_t weak_checksum,
+server4_post_rchecksum(gfx_rchecksum_rsp *rsp, uint32_t weak_checksum,
uint8_t *strong_checksum);
void
-server4_post_rename (call_frame_t *frame, server_state_t *state,
- gfx_rename_rsp *rsp,
- struct iatt *stbuf,
- struct iatt *preoldparent,
- struct iatt *postoldparent,
- struct iatt *prenewparent,
- struct iatt *postnewparent);
+server4_post_rename(call_frame_t *frame, server_state_t *state,
+ gfx_rename_rsp *rsp, struct iatt *stbuf,
+ struct iatt *preoldparent, struct iatt *postoldparent,
+ struct iatt *prenewparent, struct iatt *postnewparent);
int
-server4_post_open (call_frame_t *frame, xlator_t *this,
- gfx_open_rsp *rsp, fd_t *fd);
+server4_post_open(call_frame_t *frame, xlator_t *this, gfx_open_rsp *rsp,
+ fd_t *fd);
void
-server4_post_readv (gfx_read_rsp *rsp, struct iatt *stbuf, int op_ret);
+server4_post_readv(gfx_read_rsp *rsp, struct iatt *stbuf, int op_ret);
int
-server4_post_create (call_frame_t *frame, gfx_create_rsp *rsp,
- server_state_t *state,
- xlator_t *this, fd_t *fd, inode_t *inode,
- struct iatt *stbuf, struct iatt *preparent,
+server4_post_create(call_frame_t *frame, gfx_create_rsp *rsp,
+ server_state_t *state, xlator_t *this, fd_t *fd,
+ inode_t *inode, struct iatt *stbuf, struct iatt *preparent,
struct iatt *postparent);
void
-server4_post_common_2iatt (gfx_common_2iatt_rsp *rsp,
- struct iatt *stbuf1, struct iatt *stbuf2);
+server4_post_common_2iatt(gfx_common_2iatt_rsp *rsp, struct iatt *stbuf1,
+ struct iatt *stbuf2);
void
-server4_post_entry_remove (server_state_t *state, gfx_common_2iatt_rsp *rsp,
- struct iatt *stbuf1, struct iatt *stbuf2);
+server4_post_entry_remove(server_state_t *state, gfx_common_2iatt_rsp *rsp,
+ struct iatt *stbuf1, struct iatt *stbuf2);
void
-server4_post_common_3iatt (server_state_t *state, gfx_common_3iatt_rsp *rsp,
- inode_t *inode, struct iatt *stbuf, struct iatt *pre,
- struct iatt *post);
+server4_post_common_3iatt(server_state_t *state, gfx_common_3iatt_rsp *rsp,
+ inode_t *inode, struct iatt *stbuf, struct iatt *pre,
+ struct iatt *post);
void
-server4_post_common_iatt (server_state_t *state, gfx_common_iatt_rsp *rsp,
- struct iatt *stbuf);
+server4_post_common_iatt(server_state_t *state, gfx_common_iatt_rsp *rsp,
+ struct iatt *stbuf);
void
-server4_post_lease (gfx_lease_rsp *rsp, struct gf_lease *lease);
+server4_post_lease(gfx_lease_rsp *rsp, struct gf_lease *lease);
void
-server4_post_lookup (gfx_common_2iatt_rsp *rsp, call_frame_t *frame,
- server_state_t *state,
- inode_t *inode, struct iatt *stbuf);
+server4_post_lookup(gfx_common_2iatt_rsp *rsp, call_frame_t *frame,
+ server_state_t *state, inode_t *inode, struct iatt *stbuf);
void
-server4_post_link (server_state_t *state, gfx_common_3iatt_rsp *rsp,
- inode_t *inode, struct iatt *stbuf, struct iatt *pre,
- struct iatt *post);
+server4_post_link(server_state_t *state, gfx_common_3iatt_rsp *rsp,
+ inode_t *inode, struct iatt *stbuf, struct iatt *pre,
+ struct iatt *post);
diff --git a/xlators/protocol/server/src/server-helpers.h b/xlators/protocol/server/src/server-helpers.h
index b89105a355f..20b8d901bd2 100644
--- a/xlators/protocol/server/src/server-helpers.h
+++ b/xlators/protocol/server/src/server-helpers.h
@@ -14,119 +14,127 @@
#include "server.h"
#include "defaults.h"
-#define CALL_STATE(frame) ((server_state_t *)frame->root->state)
+#define CALL_STATE(frame) ((server_state_t *)frame->root->state)
-#define XPRT_FROM_FRAME(frame) ((rpc_transport_t *) CALL_STATE(frame)->xprt)
+#define XPRT_FROM_FRAME(frame) ((rpc_transport_t *)CALL_STATE(frame)->xprt)
-#define SERVER_CONF(frame) \
- ((server_conf_t *)XPRT_FROM_FRAME(frame)->this->private)
+#define SERVER_CONF(frame) \
+ ((server_conf_t *)XPRT_FROM_FRAME(frame)->this->private)
#define XPRT_FROM_XLATOR(this) ((((server_conf_t *)this->private))->listen)
-#define INODE_LRU_LIMIT(this) \
- (((server_conf_t *)(this->private))->config.inode_lru_limit)
+#define INODE_LRU_LIMIT(this) \
+ (((server_conf_t *)(this->private))->config.inode_lru_limit)
#define IS_ROOT_INODE(inode) (inode == inode->table->root)
-#define IS_NOT_ROOT(pathlen) ((pathlen > 2)? 1 : 0)
+#define IS_NOT_ROOT(pathlen) ((pathlen > 2) ? 1 : 0)
-void free_state (server_state_t *state);
+void
+free_state(server_state_t *state);
-void server_loc_wipe (loc_t *loc);
+void
+server_loc_wipe(loc_t *loc);
void
-server_print_request (call_frame_t *frame);
+server_print_request(call_frame_t *frame);
call_frame_t *
-get_frame_from_request (rpcsvc_request_t *req);
+get_frame_from_request(rpcsvc_request_t *req);
int
-server_connection_cleanup (xlator_t *this, struct _client *client,
- int32_t flags);
+server_connection_cleanup(xlator_t *this, struct _client *client,
+ int32_t flags);
int
-server_build_config (xlator_t *this, server_conf_t *conf);
+server_build_config(xlator_t *this, server_conf_t *conf);
-int serialize_rsp_dirent (gf_dirent_t *entries, gfs3_readdir_rsp *rsp);
-int serialize_rsp_direntp (gf_dirent_t *entries, gfs3_readdirp_rsp *rsp);
-int readdirp_rsp_cleanup (gfs3_readdirp_rsp *rsp);
-int readdir_rsp_cleanup (gfs3_readdir_rsp *rsp);
-int readdirp_rsp_cleanup_v2 (gfx_readdirp_rsp *rsp);
-int readdir_rsp_cleanup_v2 (gfx_readdir_rsp *rsp);
-int auth_set_username_passwd (dict_t *input_params, dict_t *config_params,
- struct _client *client);
+int
+serialize_rsp_dirent(gf_dirent_t *entries, gfs3_readdir_rsp *rsp);
+int
+serialize_rsp_direntp(gf_dirent_t *entries, gfs3_readdirp_rsp *rsp);
+int
+readdirp_rsp_cleanup(gfs3_readdirp_rsp *rsp);
+int
+readdir_rsp_cleanup(gfs3_readdir_rsp *rsp);
+int
+readdirp_rsp_cleanup_v2(gfx_readdirp_rsp *rsp);
+int
+readdir_rsp_cleanup_v2(gfx_readdir_rsp *rsp);
+int
+auth_set_username_passwd(dict_t *input_params, dict_t *config_params,
+ struct _client *client);
-server_ctx_t *server_ctx_get (client_t *client, xlator_t *xlator);
-int server_process_event_upcall (xlator_t *this, void *data);
+server_ctx_t *
+server_ctx_get(client_t *client, xlator_t *xlator);
+int
+server_process_event_upcall(xlator_t *this, void *data);
inode_t *
-server_inode_new (inode_table_t *itable, uuid_t gfid);
+server_inode_new(inode_table_t *itable, uuid_t gfid);
int
-serialize_rsp_locklist (lock_migration_info_t *locklist,
- gfs3_getactivelk_rsp *rsp);
+serialize_rsp_locklist(lock_migration_info_t *locklist,
+ gfs3_getactivelk_rsp *rsp);
int
-serialize_rsp_locklist_v2 (lock_migration_info_t *locklist,
- gfx_getactivelk_rsp *rsp);
+serialize_rsp_locklist_v2(lock_migration_info_t *locklist,
+ gfx_getactivelk_rsp *rsp);
int
-getactivelkinfo_rsp_cleanup (gfs3_getactivelk_rsp *rsp);
+getactivelkinfo_rsp_cleanup(gfs3_getactivelk_rsp *rsp);
int
-getactivelkinfo_rsp_cleanup_v2 (gfx_getactivelk_rsp *rsp);
+getactivelkinfo_rsp_cleanup_v2(gfx_getactivelk_rsp *rsp);
int
-server_populate_compound_response (xlator_t *this, gfs3_compound_rsp *rsp,
- call_frame_t *frame,
- compound_args_cbk_t *args_cbk, int index);
+server_populate_compound_response(xlator_t *this, gfs3_compound_rsp *rsp,
+ call_frame_t *frame,
+ compound_args_cbk_t *args_cbk, int index);
int
-server_get_compound_resolve (server_state_t *state, gfs3_compound_req *req);
+server_get_compound_resolve(server_state_t *state, gfs3_compound_req *req);
int
-server_populate_compound_request (gfs3_compound_req *req, call_frame_t *frame,
- default_args_t *this_args,
- int index);
+server_populate_compound_request(gfs3_compound_req *req, call_frame_t *frame,
+ default_args_t *this_args, int index);
void
-server_compound_rsp_cleanup (gfs3_compound_rsp *rsp, compound_args_cbk_t *args);
+server_compound_rsp_cleanup(gfs3_compound_rsp *rsp, compound_args_cbk_t *args);
void
-server_compound_req_cleanup (gfs3_compound_req *req, int len);
+server_compound_req_cleanup(gfs3_compound_req *req, int len);
int
-unserialize_req_locklist (gfs3_setactivelk_req *req,
- lock_migration_info_t *lmi);
+unserialize_req_locklist(gfs3_setactivelk_req *req, lock_migration_info_t *lmi);
int
-unserialize_req_locklist_v2 (gfx_setactivelk_req *req,
- lock_migration_info_t *lmi);
+unserialize_req_locklist_v2(gfx_setactivelk_req *req,
+ lock_migration_info_t *lmi);
int
-serialize_rsp_dirent (gf_dirent_t *entries, gfs3_readdir_rsp *rsp);
+serialize_rsp_dirent(gf_dirent_t *entries, gfs3_readdir_rsp *rsp);
int
-serialize_rsp_direntp (gf_dirent_t *entries, gfs3_readdirp_rsp *rsp);
+serialize_rsp_direntp(gf_dirent_t *entries, gfs3_readdirp_rsp *rsp);
int
-serialize_rsp_dirent_v2 (gf_dirent_t *entries, gfx_readdir_rsp *rsp);
+serialize_rsp_dirent_v2(gf_dirent_t *entries, gfx_readdir_rsp *rsp);
int
-serialize_rsp_direntp_v2 (gf_dirent_t *entries, gfx_readdirp_rsp *rsp);
+serialize_rsp_direntp_v2(gf_dirent_t *entries, gfx_readdirp_rsp *rsp);
int
-server_populate_compound_response_v2 (xlator_t *this, gfx_compound_rsp *rsp,
- call_frame_t *frame,
- compound_args_cbk_t *args_cbk, int index);
+server_populate_compound_response_v2(xlator_t *this, gfx_compound_rsp *rsp,
+ call_frame_t *frame,
+ compound_args_cbk_t *args_cbk, int index);
int
-server_get_compound_resolve_v2 (server_state_t *state, gfx_compound_req *req);
+server_get_compound_resolve_v2(server_state_t *state, gfx_compound_req *req);
int
-server_populate_compound_request_v2 (gfx_compound_req *req, call_frame_t *frame,
- default_args_t *this_args,
- int index);
+server_populate_compound_request_v2(gfx_compound_req *req, call_frame_t *frame,
+ default_args_t *this_args, int index);
void
-server_compound_rsp_cleanup_v2 (gfx_compound_rsp *rsp, compound_args_cbk_t *args);
+server_compound_rsp_cleanup_v2(gfx_compound_rsp *rsp,
+ compound_args_cbk_t *args);
void
-server_compound_req_cleanup_v2 (gfx_compound_req *req, int len);
-
+server_compound_req_cleanup_v2(gfx_compound_req *req, int len);
#endif /* !_SERVER_HELPERS_H */
diff --git a/xlators/protocol/server/src/server-mem-types.h b/xlators/protocol/server/src/server-mem-types.h
index 76a78ac3ede..4b341e53845 100644
--- a/xlators/protocol/server/src/server-mem-types.h
+++ b/xlators/protocol/server/src/server-mem-types.h
@@ -8,27 +8,26 @@
cases as published by the Free Software Foundation.
*/
-
#ifndef __SERVER_MEM_TYPES_H__
#define __SERVER_MEM_TYPES_H__
#include "mem-types.h"
enum gf_server_mem_types_ {
- gf_server_mt_server_conf_t = gf_common_mt_end + 1,
- gf_server_mt_resolv_comp_t,
- gf_server_mt_state_t,
- gf_server_mt_locker_t,
- gf_server_mt_lock_table_t,
- gf_server_mt_conn_t,
- gf_server_mt_dirent_rsp_t,
- gf_server_mt_rsp_buf_t,
- gf_server_mt_volfile_ctx_t,
- gf_server_mt_timer_data_t,
- gf_server_mt_setvolume_rsp_t,
- gf_server_mt_lock_mig_t,
- gf_server_mt_compound_rsp_t,
- gf_server_mt_child_status,
- gf_server_mt_end,
+ gf_server_mt_server_conf_t = gf_common_mt_end + 1,
+ gf_server_mt_resolv_comp_t,
+ gf_server_mt_state_t,
+ gf_server_mt_locker_t,
+ gf_server_mt_lock_table_t,
+ gf_server_mt_conn_t,
+ gf_server_mt_dirent_rsp_t,
+ gf_server_mt_rsp_buf_t,
+ gf_server_mt_volfile_ctx_t,
+ gf_server_mt_timer_data_t,
+ gf_server_mt_setvolume_rsp_t,
+ gf_server_mt_lock_mig_t,
+ gf_server_mt_compound_rsp_t,
+ gf_server_mt_child_status,
+ gf_server_mt_end,
};
#endif /* __SERVER_MEM_TYPES_H__ */
diff --git a/xlators/protocol/server/src/server-messages.h b/xlators/protocol/server/src/server-messages.h
index f7698806e3c..bc7431b9d86 100644
--- a/xlators/protocol/server/src/server-messages.h
+++ b/xlators/protocol/server/src/server-messages.h
@@ -23,101 +23,43 @@
* glfs-message-id.h.
*/
-GLFS_MSGID(PS,
- PS_MSG_AUTHENTICATE_ERROR,
- PS_MSG_VOL_VALIDATE_FAILED,
- PS_MSG_AUTH_INIT_FAILED,
- PS_MSG_REMOTE_CLIENT_REFUSED,
- PS_MSG_GFID_RESOLVE_FAILED,
- PS_MSG_ANONYMOUS_FD_CREATE_FAILED,
- PS_MSG_NO_MEMORY,
- PS_MSG_FD_NOT_FOUND,
- PS_MSG_INVALID_ENTRY,
- PS_MSG_GET_UID_FAILED,
- PS_MSG_UID_NOT_FOUND,
- PS_MSG_MAPPING_ERROR,
- PS_MSG_FD_CLEANUP,
- PS_MSG_SERVER_CTX_GET_FAILED,
- PS_MSG_FDENTRY_NULL,
- PS_MSG_DIR_NOT_FOUND,
- PS_MSG_SERVER_MSG,
- PS_MSG_DICT_SERIALIZE_FAIL,
- PS_MSG_RW_STAT,
- PS_MSG_DICT_GET_FAILED,
- PS_MSG_LOGIN_ERROR,
- PS_MSG_REMOUNT_CLIENT_REQD,
- PS_MSG_DEFAULTING_FILE,
- PS_MSG_VOL_FILE_OPEN_FAILED,
- PS_MSG_STAT_ERROR,
- PS_MSG_SSL_NAME_SET_FAILED,
- PS_MSG_ASPRINTF_FAILED,
- PS_MSG_CLIENT_VERSION_NOT_SET,
- PS_MSG_CLIENT_ACCEPTED,
- PS_MSG_CLIENT_LK_VERSION_ERROR,
- PS_MSG_GRACE_TIMER_EXPD,
- PS_MSG_SERIALIZE_REPLY_FAILED,
- PS_MSG_AUTH_IP_ERROR,
- PS_MSG_SKIP_FORMAT_CHK,
- PS_MSG_INTERNET_ADDR_ERROR,
- PS_MSG_CLIENT_DISCONNECTING,
- PS_MSG_GRACE_TIMER_START,
- PS_MSG_STATEDUMP_PATH_ERROR,
- PS_MSG_GRP_CACHE_ERROR,
- PS_MSG_RPC_CONF_ERROR,
- PS_MSG_TRANSPORT_ERROR,
- PS_MSG_SUBVOL_NULL,
- PS_MSG_PARENT_VOL_ERROR,
- PS_MSG_RPCSVC_CREATE_FAILED,
- PS_MSG_RPCSVC_LISTENER_CREATE_FAILED,
- PS_MSG_RPCSVC_NOTIFY,
- PS_MSG_PGM_REG_FAILED,
- PS_MSG_ULIMIT_SET_FAILED,
- PS_MSG_STATFS,
- PS_MSG_LOOKUP_INFO,
- PS_MSG_LK_INFO,
- PS_MSG_LOCK_ERROR,
- PS_MSG_INODELK_INFO,
- PS_MSG_ENTRYLK_INFO,
- PS_MSG_ACCESS_INFO,
- PS_MSG_DIR_INFO,
- PS_MSG_MKNOD_INFO,
- PS_MSG_REMOVEXATTR_INFO,
- PS_MSG_GETXATTR_INFO,
- PS_MSG_SETXATTR_INFO,
- PS_MSG_RENAME_INFO,
- PS_MSG_LINK_INFO,
- PS_MSG_TRUNCATE_INFO,
- PS_MSG_FSTAT_INFO,
- PS_MSG_FLUSH_INFO,
- PS_MSG_SYNC_INFO,
- PS_MSG_WRITE_INFO,
- PS_MSG_READ_INFO,
- PS_MSG_CHKSUM_INFO,
- PS_MSG_OPEN_INFO,
- PS_MSG_CREATE_INFO,
- PS_MSG_SETATTR_INFO,
- PS_MSG_XATTROP_INFO,
- PS_MSG_ALLOC_INFO,
- PS_MSG_DISCARD_INFO,
- PS_MSG_ZEROFILL_INFO,
- PS_MSG_FD_CREATE_FAILED,
- PS_MSG_WRONG_STATE,
- PS_MSG_CONF_DIR_INVALID,
- PS_MSG_MOUNT_PT_FAIL,
- PS_MSG_STAT_INFO,
- PS_MSG_FILE_OP_FAILED,
- PS_MSG_GRACE_TIMER_CANCELLED,
- PS_MSG_ENCODE_MSG_FAILED,
- PS_MSG_REPLY_SUBMIT_FAILED,
- PS_MSG_RPC_NOTIFY_ERROR,
- PS_MSG_SERVER_EVENT_UPCALL_FAILED,
- PS_MSG_SERVER_IPC_INFO,
- PS_MSG_SEEK_INFO,
- PS_MSG_COMPOUND_INFO,
- PS_MSG_CLIENT_OPVERSION_GET_FAILED,
- PS_MSG_CHILD_STATUS_FAILED,
- PS_MSG_PUT_INFO
-);
+GLFS_MSGID(PS, PS_MSG_AUTHENTICATE_ERROR, PS_MSG_VOL_VALIDATE_FAILED,
+ PS_MSG_AUTH_INIT_FAILED, PS_MSG_REMOTE_CLIENT_REFUSED,
+ PS_MSG_GFID_RESOLVE_FAILED, PS_MSG_ANONYMOUS_FD_CREATE_FAILED,
+ PS_MSG_NO_MEMORY, PS_MSG_FD_NOT_FOUND, PS_MSG_INVALID_ENTRY,
+ PS_MSG_GET_UID_FAILED, PS_MSG_UID_NOT_FOUND, PS_MSG_MAPPING_ERROR,
+ PS_MSG_FD_CLEANUP, PS_MSG_SERVER_CTX_GET_FAILED, PS_MSG_FDENTRY_NULL,
+ PS_MSG_DIR_NOT_FOUND, PS_MSG_SERVER_MSG, PS_MSG_DICT_SERIALIZE_FAIL,
+ PS_MSG_RW_STAT, PS_MSG_DICT_GET_FAILED, PS_MSG_LOGIN_ERROR,
+ PS_MSG_REMOUNT_CLIENT_REQD, PS_MSG_DEFAULTING_FILE,
+ PS_MSG_VOL_FILE_OPEN_FAILED, PS_MSG_STAT_ERROR,
+ PS_MSG_SSL_NAME_SET_FAILED, PS_MSG_ASPRINTF_FAILED,
+ PS_MSG_CLIENT_VERSION_NOT_SET, PS_MSG_CLIENT_ACCEPTED,
+ PS_MSG_CLIENT_LK_VERSION_ERROR, PS_MSG_GRACE_TIMER_EXPD,
+ PS_MSG_SERIALIZE_REPLY_FAILED, PS_MSG_AUTH_IP_ERROR,
+ PS_MSG_SKIP_FORMAT_CHK, PS_MSG_INTERNET_ADDR_ERROR,
+ PS_MSG_CLIENT_DISCONNECTING, PS_MSG_GRACE_TIMER_START,
+ PS_MSG_STATEDUMP_PATH_ERROR, PS_MSG_GRP_CACHE_ERROR,
+ PS_MSG_RPC_CONF_ERROR, PS_MSG_TRANSPORT_ERROR, PS_MSG_SUBVOL_NULL,
+ PS_MSG_PARENT_VOL_ERROR, PS_MSG_RPCSVC_CREATE_FAILED,
+ PS_MSG_RPCSVC_LISTENER_CREATE_FAILED, PS_MSG_RPCSVC_NOTIFY,
+ PS_MSG_PGM_REG_FAILED, PS_MSG_ULIMIT_SET_FAILED, PS_MSG_STATFS,
+ PS_MSG_LOOKUP_INFO, PS_MSG_LK_INFO, PS_MSG_LOCK_ERROR,
+ PS_MSG_INODELK_INFO, PS_MSG_ENTRYLK_INFO, PS_MSG_ACCESS_INFO,
+ PS_MSG_DIR_INFO, PS_MSG_MKNOD_INFO, PS_MSG_REMOVEXATTR_INFO,
+ PS_MSG_GETXATTR_INFO, PS_MSG_SETXATTR_INFO, PS_MSG_RENAME_INFO,
+ PS_MSG_LINK_INFO, PS_MSG_TRUNCATE_INFO, PS_MSG_FSTAT_INFO,
+ PS_MSG_FLUSH_INFO, PS_MSG_SYNC_INFO, PS_MSG_WRITE_INFO,
+ PS_MSG_READ_INFO, PS_MSG_CHKSUM_INFO, PS_MSG_OPEN_INFO,
+ PS_MSG_CREATE_INFO, PS_MSG_SETATTR_INFO, PS_MSG_XATTROP_INFO,
+ PS_MSG_ALLOC_INFO, PS_MSG_DISCARD_INFO, PS_MSG_ZEROFILL_INFO,
+ PS_MSG_FD_CREATE_FAILED, PS_MSG_WRONG_STATE, PS_MSG_CONF_DIR_INVALID,
+ PS_MSG_MOUNT_PT_FAIL, PS_MSG_STAT_INFO, PS_MSG_FILE_OP_FAILED,
+ PS_MSG_GRACE_TIMER_CANCELLED, PS_MSG_ENCODE_MSG_FAILED,
+ PS_MSG_REPLY_SUBMIT_FAILED, PS_MSG_RPC_NOTIFY_ERROR,
+ PS_MSG_SERVER_EVENT_UPCALL_FAILED, PS_MSG_SERVER_IPC_INFO,
+ PS_MSG_SEEK_INFO, PS_MSG_COMPOUND_INFO,
+ PS_MSG_CLIENT_OPVERSION_GET_FAILED, PS_MSG_CHILD_STATUS_FAILED,
+ PS_MSG_PUT_INFO);
#endif /* !_PS_MESSAGES_H__ */
-
diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h
index 88aaa263018..e6064af076e 100644
--- a/xlators/protocol/server/src/server.h
+++ b/xlators/protocol/server/src/server.h
@@ -26,237 +26,234 @@
#include "defaults.h"
#include "authenticate.h"
-#define DEFAULT_BLOCK_SIZE 4194304 /* 4MB */
-#define DEFAULT_VOLUME_FILE_PATH CONFDIR "/glusterfs.vol"
-#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB)
-#define GF_MIN_SOCKET_WINDOW_SIZE (0)
-
-#define CPD_REQ_FIELD(v, f) ((v)->compound_req_u.compound_##f##_req)
-#define CPD_RSP_FIELD(v, f) ((v)->compound_rsp_u.compound_##f##_rsp)
-
-#define SERVER_COMMON_RSP_CLEANUP(rsp, fop, i) \
- do { \
- compound_rsp *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i];\
- gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
- \
- GF_FREE (_this_rsp->xdata.xdata_val); \
- } while (0)
-
-#define SERVER_FOP_RSP_CLEANUP(rsp, fop, i) \
- do { \
- compound_rsp *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i];\
- gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
- \
- GF_FREE (_this_rsp->xdata.xdata_val); \
- } while (0)
-
-#define SERVER_COMPOUND_FOP_CLEANUP(curr_req, fop) \
- do { \
- gfs3_##fop##_req *_req = &CPD_REQ_FIELD(curr_req, fop); \
- \
- free (_req->xdata.xdata_val); \
- } while (0)
-
-#define CPD4_REQ_FIELD(v, f) ((v)->compound_req_v2_u.compound_##f##_req)
-#define CPD4_RSP_FIELD(v, f) ((v)->compound_rsp_v2_u.compound_##f##_rsp)
-
-#define SERVER4_COMMON_RSP_CLEANUP(rsp, fop, i) \
- do { \
- compound_rsp_v2 *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
- gfx_common_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp, fop); \
- \
- GF_FREE (_this_rsp->xdata.pairs.pairs_val); \
- } while (0)
-
-#define SERVER4_FOP_RSP_CLEANUP(rsp, fop, i, rsp_type) \
- do { \
- compound_rsp_v2 *this_rsp = NULL; \
- this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
- gfx_##rsp_type##_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp, fop); \
- \
- GF_FREE (_this_rsp->xdata.pairs.pairs_val); \
- } while (0)
-
+#define DEFAULT_BLOCK_SIZE 4194304 /* 4MB */
+#define DEFAULT_VOLUME_FILE_PATH CONFDIR "/glusterfs.vol"
+#define GF_MAX_SOCKET_WINDOW_SIZE (1 * GF_UNIT_MB)
+#define GF_MIN_SOCKET_WINDOW_SIZE (0)
+
+#define CPD_REQ_FIELD(v, f) ((v)->compound_req_u.compound_##f##_req)
+#define CPD_RSP_FIELD(v, f) ((v)->compound_rsp_u.compound_##f##_rsp)
+
+#define SERVER_COMMON_RSP_CLEANUP(rsp, fop, i) \
+ do { \
+ compound_rsp *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gf_common_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
+ \
+ GF_FREE(_this_rsp->xdata.xdata_val); \
+ } while (0)
+
+#define SERVER_FOP_RSP_CLEANUP(rsp, fop, i) \
+ do { \
+ compound_rsp *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gfs3_##fop##_rsp *_this_rsp = &CPD_RSP_FIELD(this_rsp, fop); \
+ \
+ GF_FREE(_this_rsp->xdata.xdata_val); \
+ } while (0)
+
+#define SERVER_COMPOUND_FOP_CLEANUP(curr_req, fop) \
+ do { \
+ gfs3_##fop##_req *_req = &CPD_REQ_FIELD(curr_req, fop); \
+ \
+ free(_req->xdata.xdata_val); \
+ } while (0)
+
+#define CPD4_REQ_FIELD(v, f) ((v)->compound_req_v2_u.compound_##f##_req)
+#define CPD4_RSP_FIELD(v, f) ((v)->compound_rsp_v2_u.compound_##f##_rsp)
+
+#define SERVER4_COMMON_RSP_CLEANUP(rsp, fop, i) \
+ do { \
+ compound_rsp_v2 *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gfx_common_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp, fop); \
+ \
+ GF_FREE(_this_rsp->xdata.pairs.pairs_val); \
+ } while (0)
+
+#define SERVER4_FOP_RSP_CLEANUP(rsp, fop, i, rsp_type) \
+ do { \
+ compound_rsp_v2 *this_rsp = NULL; \
+ this_rsp = &rsp->compound_rsp_array.compound_rsp_array_val[i]; \
+ gfx_##rsp_type##_rsp *_this_rsp = &CPD4_RSP_FIELD(this_rsp, fop); \
+ \
+ GF_FREE(_this_rsp->xdata.pairs.pairs_val); \
+ } while (0)
typedef enum {
- INTERNAL_LOCKS = 1,
- POSIX_LOCKS = 2,
+ INTERNAL_LOCKS = 1,
+ POSIX_LOCKS = 2,
} server_lock_flags_t;
typedef struct _server_state server_state_t;
-int server_null (rpcsvc_request_t *req);
+int
+server_null(rpcsvc_request_t *req);
struct _volfile_ctx {
- struct _volfile_ctx *next;
- char *key;
- uint32_t checksum;
+ struct _volfile_ctx *next;
+ char *key;
+ uint32_t checksum;
};
struct _child_status {
- struct list_head status_list;
- char *name;
- gf_boolean_t child_up;
- gf_atomic_t xprtrefcnt;
+ struct list_head status_list;
+ char *name;
+ gf_boolean_t child_up;
+ gf_atomic_t xprtrefcnt;
};
struct server_conf {
- rpcsvc_t *rpc;
- struct rpcsvc_config rpc_conf;
- int inode_lru_limit;
- gf_boolean_t verify_volfile;
- gf_boolean_t trace;
- char *conf_dir;
- struct _volfile_ctx *volfile;
- dict_t *auth_modules;
- pthread_mutex_t mutex;
- struct list_head xprt_list;
- pthread_t barrier_th;
-
- gf_boolean_t server_manage_gids; /* resolve gids on brick */
- gid_cache_t gid_cache;
- int32_t gid_cache_timeout;
-
- int event_threads; /* # of event threads
- * configured */
-
- gf_boolean_t parent_up;
- gf_boolean_t dync_auth; /* if set authenticate dynamically,
- * in case if volume set options
- * (say *.allow | *.reject) are
- * tweeked */
- struct _child_status *child_status;
- gf_lock_t itable_lock;
- gf_boolean_t strict_auth_enabled;
+ rpcsvc_t *rpc;
+ struct rpcsvc_config rpc_conf;
+ int inode_lru_limit;
+ gf_boolean_t verify_volfile;
+ gf_boolean_t trace;
+ char *conf_dir;
+ struct _volfile_ctx *volfile;
+ dict_t *auth_modules;
+ pthread_mutex_t mutex;
+ struct list_head xprt_list;
+ pthread_t barrier_th;
+
+ gf_boolean_t server_manage_gids; /* resolve gids on brick */
+ gid_cache_t gid_cache;
+ int32_t gid_cache_timeout;
+
+ int event_threads; /* # of event threads
+ * configured */
+
+ gf_boolean_t parent_up;
+ gf_boolean_t dync_auth; /* if set authenticate dynamically,
+ * in case if volume set options
+ * (say *.allow | *.reject) are
+ * tweeked */
+ struct _child_status *child_status;
+ gf_lock_t itable_lock;
+ gf_boolean_t strict_auth_enabled;
};
typedef struct server_conf server_conf_t;
-
typedef enum {
- RESOLVE_MUST = 1,
- RESOLVE_NOT,
- RESOLVE_MAY,
- RESOLVE_DONTCARE,
- RESOLVE_EXACT
+ RESOLVE_MUST = 1,
+ RESOLVE_NOT,
+ RESOLVE_MAY,
+ RESOLVE_DONTCARE,
+ RESOLVE_EXACT
} server_resolve_type_t;
-
struct resolve_comp {
- char *basename;
- inode_t *inode;
+ char *basename;
+ inode_t *inode;
};
typedef struct {
- server_resolve_type_t type;
- int64_t fd_no;
- u_char gfid[16];
- u_char pargfid[16];
- char *path;
- char *bname;
- int op_ret;
- int op_errno;
- loc_t resolve_loc;
+ server_resolve_type_t type;
+ int64_t fd_no;
+ u_char gfid[16];
+ u_char pargfid[16];
+ char *path;
+ char *bname;
+ int op_ret;
+ int op_errno;
+ loc_t resolve_loc;
} server_resolve_t;
-
-typedef int (*server_resume_fn_t) (call_frame_t *frame, xlator_t *bound_xl);
+typedef int (*server_resume_fn_t)(call_frame_t *frame, xlator_t *bound_xl);
int
-resolve_and_resume (call_frame_t *frame, server_resume_fn_t fn);
+resolve_and_resume(call_frame_t *frame, server_resume_fn_t fn);
struct _server_state {
- rpc_transport_t *xprt;
- inode_table_t *itable;
-
- server_resume_fn_t resume_fn;
-
- loc_t loc;
- loc_t loc2;
- server_resolve_t resolve;
- server_resolve_t resolve2;
-
- /* used within resolve_and_resume */
- loc_t *loc_now;
- server_resolve_t *resolve_now;
-
- struct iatt stbuf;
- int valid;
-
- fd_t *fd;
- dict_t *params;
- int32_t flags;
- int wbflags;
- struct iovec payload_vector[MAX_IOVEC];
- int payload_count;
- struct iobuf *iobuf;
- struct iobref *iobref;
-
- size_t size;
- off_t offset;
- mode_t mode;
- dev_t dev;
- size_t nr_count;
- int cmd;
- int type;
- char *name;
- int name_len;
-
- int mask;
- char is_revalidate;
- dict_t *dict;
- struct gf_flock flock;
- const char *volume;
- dir_entry_t *entry;
- gf_seek_what_t what;
-
- dict_t *xdata;
- mode_t umask;
- struct gf_lease lease;
- lock_migration_info_t locklist;
- /* required for compound fops */
- gfs3_compound_req req;
- /* TODO: having xdr definition here
- is not a good idea, but not taking
- up the functionality right now */
- gfx_compound_req req_v2;
-
- /* last length till which iovec for compound
- * writes was processed */
- int write_length;
- struct iovec rsp_vector[MAX_IOVEC];
- int rsp_count;
- struct iobuf *rsp_iobuf;
- struct iobref *rsp_iobref;
- compound_args_t *args;
-
- /* subdir mount */
- client_t *client;
+ rpc_transport_t *xprt;
+ inode_table_t *itable;
+
+ server_resume_fn_t resume_fn;
+
+ loc_t loc;
+ loc_t loc2;
+ server_resolve_t resolve;
+ server_resolve_t resolve2;
+
+ /* used within resolve_and_resume */
+ loc_t *loc_now;
+ server_resolve_t *resolve_now;
+
+ struct iatt stbuf;
+ int valid;
+
+ fd_t *fd;
+ dict_t *params;
+ int32_t flags;
+ int wbflags;
+ struct iovec payload_vector[MAX_IOVEC];
+ int payload_count;
+ struct iobuf *iobuf;
+ struct iobref *iobref;
+
+ size_t size;
+ off_t offset;
+ mode_t mode;
+ dev_t dev;
+ size_t nr_count;
+ int cmd;
+ int type;
+ char *name;
+ int name_len;
+
+ int mask;
+ char is_revalidate;
+ dict_t *dict;
+ struct gf_flock flock;
+ const char *volume;
+ dir_entry_t *entry;
+ gf_seek_what_t what;
+
+ dict_t *xdata;
+ mode_t umask;
+ struct gf_lease lease;
+ lock_migration_info_t locklist;
+ /* required for compound fops */
+ gfs3_compound_req req;
+ /* TODO: having xdr definition here
+ is not a good idea, but not taking
+ up the functionality right now */
+ gfx_compound_req req_v2;
+
+ /* last length till which iovec for compound
+ * writes was processed */
+ int write_length;
+ struct iovec rsp_vector[MAX_IOVEC];
+ int rsp_count;
+ struct iobuf *rsp_iobuf;
+ struct iobref *rsp_iobref;
+ compound_args_t *args;
+
+ /* subdir mount */
+ client_t *client;
};
-
extern struct rpcsvc_program gluster_handshake_prog;
extern struct rpcsvc_program glusterfs3_3_fop_prog;
extern struct rpcsvc_program glusterfs4_0_fop_prog;
typedef struct _server_ctx {
- gf_lock_t fdtable_lock;
- fdtable_t *fdtable;
+ gf_lock_t fdtable_lock;
+ fdtable_t *fdtable;
} server_ctx_t;
-
int
-server_submit_reply (call_frame_t *frame, rpcsvc_request_t *req, void *arg,
- struct iovec *payload, int payloadcount,
- struct iobref *iobref, xdrproc_t xdrproc);
+server_submit_reply(call_frame_t *frame, rpcsvc_request_t *req, void *arg,
+ struct iovec *payload, int payloadcount,
+ struct iobref *iobref, xdrproc_t xdrproc);
-int gf_server_check_setxattr_cmd (call_frame_t *frame, dict_t *dict);
-int gf_server_check_getxattr_cmd (call_frame_t *frame, const char *name);
+int
+gf_server_check_setxattr_cmd(call_frame_t *frame, dict_t *dict);
+int
+gf_server_check_getxattr_cmd(call_frame_t *frame, const char *name);
void
-forget_inode_if_no_dentry (inode_t *inode);
+forget_inode_if_no_dentry(inode_t *inode);
-server_ctx_t*
-server_ctx_get (client_t *client, xlator_t *xlator);
+server_ctx_t *
+server_ctx_get(client_t *client, xlator_t *xlator);
#endif /* !_SERVER_H */