summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-handshake.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-10-10 17:13:25 +0530
committerAmar Tumballi <amarts@redhat.com>2017-11-07 07:53:55 +0000
commite4240431b033d1f0c351d3d874c248126ca6cadc (patch)
treed83c1dcb42fb8c6f7bd903422e8c351394124d52 /xlators/protocol/client/src/client-handshake.c
parent56aef68530b3bab27730aa62e4fbc513d3dba65f (diff)
rpc: bring a new protocol version
* xdr: add gfid to on wire format for fsetattr/rchecksum * as it is change in on wire XDR format, needed backward compatible RPC programs. Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 827334 Change-Id: Id0a2da3632516dc1a5560dde2b151b2e5f0be8e5
Diffstat (limited to 'xlators/protocol/client/src/client-handshake.c')
-rw-r--r--xlators/protocol/client/src/client-handshake.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
index 6fdea91..587e256 100644
--- a/xlators/protocol/client/src/client-handshake.c
+++ b/xlators/protocol/client/src/client-handshake.c
@@ -23,6 +23,7 @@
#define CLIENT_REOPEN_MAX_ATTEMPTS 1024
extern rpc_clnt_prog_t clnt3_3_fop_prog;
+extern rpc_clnt_prog_t clnt4_0_fop_prog;
extern rpc_clnt_prog_t clnt_pmap_prog;
int client_set_lk_version_cbk (struct rpc_req *req, struct iovec *iov,
@@ -1487,6 +1488,19 @@ select_server_supported_programs (xlator_t *this, gf_prog_detail *prog)
trav->progname, trav->prognum, trav->progver);
ret = 0;
}
+
+ if ((clnt4_0_fop_prog.prognum == trav->prognum) &&
+ (clnt4_0_fop_prog.progver == trav->progver)) {
+ conf->fops = &clnt4_0_fop_prog;
+ gf_msg (this->name, GF_LOG_INFO, 0,
+ PC_MSG_VERSION_INFO, "Using Program %s,"
+ " Num (%"PRId64"), Version (%"PRId64")",
+ trav->progname, trav->prognum, trav->progver);
+ ret = 0;
+ /* this is latest program, lets use it */
+ goto out;
+ }
+
if (ret) {
gf_msg_trace (this->name, 0,
"%s (%"PRId64") not supported",