From ef108d4fa77fd9aba48a7b9475c9b72352c16e6a Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Date: Fri, 9 Mar 2012 12:44:05 +0530 Subject: protocol/client: Register a timer(grace-timer) conditionally. A grace timer is registered on a disconnect, but a reconnect timer sends a connect request after every 3sec and if the server is down, the client protocol receives disconnect and a grace timer will be registered which on timeout will increase the lk-version value. Its enough to register the grace timer once after the disconnect and later just ignore other psuedo disconnects. Change-Id: I36a153aa86b350d87fe50d014ee0297f558a7fb6 BUG: 795386 Signed-off-by: Mohammed Junaid Reviewed-on: http://review.gluster.com/2906 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- xlators/protocol/client/src/client.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xlators/protocol/client/src/client.h') diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h index 1f8f75cece5..7203556f58e 100644 --- a/xlators/protocol/client/src/client.h +++ b/xlators/protocol/client/src/client.h @@ -100,7 +100,12 @@ typedef struct clnt_conf { performing lock healing */ struct timeval grace_tv; gf_timer_t *grace_timer; - + gf_boolean_t grace_timer_flag; /* The state of this flag will + be used to decide whether + a new grace-timer must be + registered or not. False + means dont register, true + means register */ char parent_down; } clnt_conf_t; -- cgit