diff options
author | Amar Tumballi <amarts@redhat.com> | 2017-12-22 13:12:42 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-01-19 22:48:39 +0530 |
commit | 303cc2b54797bc5371be742543ccb289010c92f2 (patch) | |
tree | cf383488d0edff81b012b5e908f8ebca7affaea3 /xlators/protocol/server/src/server-helpers.h | |
parent | 9eefff096fd9b54120e4347b6b00f10a6c502cf4 (diff) |
protocol: make on-wire-change of protocol using new XDR definition.
With this patchset, some major things are changed in XDR, mainly:
* Naming: Instead of gfs3/gfs4 settle for gfx_ for xdr structures
* add iattx as a separate structure, and add conversion methods
* the *_rsp structure is now changed, and is also reduced in number
(ie, no need for different strucutes if it is similar to other response).
* use proper XDR methods for sending dict on wire.
Also, with the change of xdr structure, there are changes needed
outside of xlator protocol layer to handle these properly. Mainly
because the abstraction was broken to support 0-copy RDMA with payload
for write and read FOP. This made transport layer know about the xdr
payload, hence with the change of xdr payload structure, transport layer
needed to know about the change.
Updates #384
Change-Id: I1448fbe9deab0a1b06cb8351f2f37488cefe461f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server-helpers.h')
-rw-r--r-- | xlators/protocol/server/src/server-helpers.h | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server-helpers.h b/xlators/protocol/server/src/server-helpers.h index 1f47bc9dff1..9fe60fd231b 100644 --- a/xlators/protocol/server/src/server-helpers.h +++ b/xlators/protocol/server/src/server-helpers.h @@ -54,6 +54,8 @@ 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); @@ -65,10 +67,15 @@ server_inode_new (inode_table_t *itable, uuid_t gfid); int serialize_rsp_locklist (lock_migration_info_t *locklist, - gfs3_getactivelk_rsp *rsp); + gfs3_getactivelk_rsp *rsp); +int +serialize_rsp_locklist_v2 (lock_migration_info_t *locklist, + gfx_getactivelk_rsp *rsp); int getactivelkinfo_rsp_cleanup (gfs3_getactivelk_rsp *rsp); +int +getactivelkinfo_rsp_cleanup_v2 (gfx_getactivelk_rsp *rsp); int server_populate_compound_response (xlator_t *this, gfs3_compound_rsp *rsp, @@ -86,4 +93,43 @@ server_compound_rsp_cleanup (gfs3_compound_rsp *rsp, compound_args_cbk_t *args); void server_compound_req_cleanup (gfs3_compound_req *req, int len); + +int +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); + +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 +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); + +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); +int +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); +void +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); + + #endif /* !_SERVER_HELPERS_H */ |