From c61bc1f9e5874cb8380ec6398680fc71aea233b4 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Mon, 7 Apr 2014 10:57:45 +0530 Subject: 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 Signed-off-by: Krishnan Parthasarathi Reviewed-on: http://review.gluster.org/5202 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- rpc/rpc-lib/src/rpc-clnt-ping.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rpc/rpc-lib/src/rpc-clnt-ping.h (limited to 'rpc/rpc-lib/src/rpc-clnt-ping.h') diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.h b/rpc/rpc-lib/src/rpc-clnt-ping.h new file mode 100644 index 00000000000..e7fbf3ced9d --- /dev/null +++ b/rpc/rpc-lib/src/rpc-clnt-ping.h @@ -0,0 +1,18 @@ +/* + Copyright (c) 2014 Red Hat, Inc. + This file is part of GlusterFS. + + This file is licensed to you under your choice of the GNU Lesser + General Public License, version 3 or any later version (LGPLv3 or + later), or the GNU General Public License, version 2 (GPLv2), in all + cases as published by the Free Software Foundation. +*/ + + +#ifndef _CONFIG_H +#define _CONFIG_H +#include "config.h" +#endif + +void +rpc_clnt_start_ping (void *rpc_ptr); -- cgit