o2net: correct keepalive message protocol (revision 2)
PATCH 3/3 o2net: correct keepalive message protocol (revision 2)
Currently keepalive packet is sent to another node if a message is not heard from the other node for O2NET_KEEPALIVE_DELAY_MS seconds. The message is not resent again till the other node sends a message.
The functionality described above works as we rely on TCP protocol which guarantees message delivery. However the intention of this feature was to send a keepalive message every timeout seconds. This patch sends a message for every keepalive time interval.
Signed-off-by Srinivas Eeda <[email protected]>
--- fs/ocfs2/cluster/tcp.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
fs/ocfs2/cluster/tcp.c +5 -1
@@ -1473,7 +1473,11 @@ static void o2net_sc_send_keep_req(struct work_struct *work) container_of(work, struct o2net_sock_container, sc_keepalive_work.work); -o2net_sendpage (sc, o2net_keep_req,sizeof (*o2net_keep_req)); +if (timer_pending (&sc->sc_idle_timeout)) { +o2net_sendpage (sc, o2net_keep_req,sizeof (*o2net_keep_req)); +o2net_sc_queue_delayed_work (sc, &sc->sc_keepalive_work, +msecs_to_jiffies (o2net_keepalive_delay ())); + }sc_put (sc); }
Signature · 1 line
1.5.6.5