summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/tcp_internal.h
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2008-03-05 15:50:12 +0800
committerMark Fasheh <mfasheh@suse.com>2008-04-18 08:56:10 -0700
commit5cc3bf2786f63cceb191c3c02ddd83c6f38a7d64 (patch)
treea9d7f6fa7d251cff67d6b177835ff1f43d23ab2d /fs/ocfs2/cluster/tcp_internal.h
parent8f50eb978935431ccbf89b0344efd4ce6a924875 (diff)
ocfs2: Reconnect after idle time out.
Currently, o2net connects to a node on hb_up and disconnects on hb_down and net timeout. It disconnects on net timeout is ok, but it should attempt to reconnect back. This is because sometimes nodes get overloaded enough that the network connection breaks but the disk hb does not. And if we get into that situation, we either fence (unnecessarily) or wait for its disk hb to die (and sometimes hang in the process). So in this updated scheme, when the network disconnects, we keep attempting to reconnect till we succeed or we get a disk hb down event. If the other node is really dead, then we will eventually get a node down event. If not, we should be able to connect again and continue. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/cluster/tcp_internal.h')
-rw-r--r--fs/ocfs2/cluster/tcp_internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/cluster/tcp_internal.h b/fs/ocfs2/cluster/tcp_internal.h
index d25b9af2850..b4c5586f46e 100644
--- a/fs/ocfs2/cluster/tcp_internal.h
+++ b/fs/ocfs2/cluster/tcp_internal.h
@@ -95,6 +95,8 @@ struct o2net_node {
unsigned nn_sc_valid:1;
/* if this is set tx just returns it */
int nn_persistent_error;
+ /* It is only set to 1 after the idle time out. */
+ atomic_t nn_timeout;
/* threads waiting for an sc to arrive wait on the wq for generation
* to increase. it is increased when a connecting socket succeeds