diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-04-07 10:57:45 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-04-29 14:23:51 -0700 |
commit | c61bc1f9e5874cb8380ec6398680fc71aea233b4 (patch) | |
tree | c02fee67ebcc7c43a6338d34c5700916e672c110 /xlators/protocol/server | |
parent | 91ab65f812ec3b674f53230eacbd0d71964d3d01 (diff) |
glusterd: Ping timer implmentation
This patch refactors the existing client ping timer implementation, and makes
use of the common code for implementing both client ping timer and the
glusterd ping timer.
A new gluster rpc program for ping is introduced. The ping timer is only
started for peers that have this new program. The deafult glusterd ping
timeout is 30 seconds. It is configurable by setting the option
'ping-timeout' in glusterd.vol .
Also, this patch introduces changes in the glusterd-handshake path. The client
programs for a peer are now set in the callback of dump_versions, for both
the older handshake and the newer op-version handshake. This is the only place
in the handshake process where we know what programs a peer supports.
Change-Id: I035815ac13449ca47080ecc3253c0a9afbe9016a
BUG: 1038261
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/protocol/server')
-rw-r--r-- | xlators/protocol/server/src/server-handshake.c | 1 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 1 | ||||
-rw-r--r-- | xlators/protocol/server/src/server.h | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c index a459f89e182..f3ae96ef2ae 100644 --- a/xlators/protocol/server/src/server-handshake.c +++ b/xlators/protocol/server/src/server-handshake.c @@ -16,6 +16,7 @@ #include "server.h" #include "server-helpers.h" +#include "rpc-common-xdr.h" #include "glusterfs3-xdr.h" #include "compat-errno.h" #include "glusterfs3.h" diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index ebe62ae7c42..ce844197d90 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -18,6 +18,7 @@ #include "server.h" #include "server-helpers.h" +#include "rpc-common-xdr.h" #include "glusterfs3-xdr.h" #include "glusterfs3.h" #include "compat-errno.h" diff --git a/xlators/protocol/server/src/server.h b/xlators/protocol/server/src/server.h index 782327d775b..c5ab579140d 100644 --- a/xlators/protocol/server/src/server.h +++ b/xlators/protocol/server/src/server.h @@ -174,8 +174,6 @@ struct _server_state { extern struct rpcsvc_program gluster_handshake_prog; extern struct rpcsvc_program glusterfs3_3_fop_prog; -extern struct rpcsvc_program gluster_ping_prog; - typedef struct _server_ctx { gf_lock_t fdtable_lock; |