summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt-ping.h
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2014-07-08 08:18:27 +0530
committerVijay Bellur <vbellur@redhat.com>2014-07-09 06:57:20 -0700
commitb9f1d1a120b4469d51d2a96eecc7ce83516593ba (patch)
treee298705ca9ff57181728c0eca323ee67534218e7 /rpc/rpc-lib/src/rpc-clnt-ping.h
parent82e0fb290db880323613a3791acd33f96d421363 (diff)
rpc: Do not reset @ping_started to 0 in ping callback
This is to avoid indefinite recursion of the following kind, that could lead to a stack overflow: rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() -> rpc_clnt_start_ping() -> rpc_clnt_ping() -> rpc_clnt_submit() ... and so on, since it is possible that before rpc_clnt_start_ping() is called a second time by the thread executing this codepath, the response to previous ping request could ALWAYS come by and cause epoll thread to reset conn->ping_started to 0. This patch also fixes the issue of excessive ping traffic, which was due to the client sending one ping rpc for every fop in the worst case. Also removed dead code in glusterd. Change-Id: I7c5e6ae3b1c9d23407c0a12a319bdcb43ba7a359 BUG: 1116243 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/8257 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt-ping.h')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt-ping.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.h b/rpc/rpc-lib/src/rpc-clnt-ping.h
index 4edc416cee9..d7cd1d965e5 100644
--- a/rpc/rpc-lib/src/rpc-clnt-ping.h
+++ b/rpc/rpc-lib/src/rpc-clnt-ping.h
@@ -16,4 +16,4 @@
#define RPC_DEFAULT_PING_TIMEOUT 30
void
-rpc_clnt_start_ping (void *rpc_ptr);
+rpc_clnt_check_and_start_ping (struct rpc_clnt *rpc_ptr);