aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/cluster/tcp.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 681691bc233a..2334bfc966c1 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1536,16 +1536,20 @@ static void o2net_idle_timer(unsigned long data)
1536#endif 1536#endif
1537 1537
1538 printk(KERN_NOTICE "o2net: Connection to " SC_NODEF_FMT " has been " 1538 printk(KERN_NOTICE "o2net: Connection to " SC_NODEF_FMT " has been "
1539 "idle for %lu.%lu secs, shutting it down.\n", SC_NODEF_ARGS(sc), 1539 "idle for %lu.%lu secs.\n",
1540 msecs / 1000, msecs % 1000); 1540 SC_NODEF_ARGS(sc), msecs / 1000, msecs % 1000);
1541 1541
1542 /* 1542 /* idle timerout happen, don't shutdown the connection, but
1543 * Initialize the nn_timeout so that the next connection attempt 1543 * make fence decision. Maybe the connection can recover before
1544 * will continue in o2net_start_connect. 1544 * the decision is made.
1545 */ 1545 */
1546 atomic_set(&nn->nn_timeout, 1); 1546 atomic_set(&nn->nn_timeout, 1);
1547 o2quo_conn_err(o2net_num_from_nn(nn));
1548 queue_delayed_work(o2net_wq, &nn->nn_still_up,
1549 msecs_to_jiffies(O2NET_QUORUM_DELAY_MS));
1550
1551 o2net_sc_reset_idle_timer(sc);
1547 1552
1548 o2net_sc_queue_work(sc, &sc->sc_shutdown_work);
1549} 1553}
1550 1554
1551static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc) 1555static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc)
@@ -1560,6 +1564,15 @@ static void o2net_sc_reset_idle_timer(struct o2net_sock_container *sc)
1560 1564
1561static void o2net_sc_postpone_idle(struct o2net_sock_container *sc) 1565static void o2net_sc_postpone_idle(struct o2net_sock_container *sc)
1562{ 1566{
1567 struct o2net_node *nn = o2net_nn_from_num(sc->sc_node->nd_num);
1568
1569 /* clear fence decision since the connection recover from timeout*/
1570 if (atomic_read(&nn->nn_timeout)) {
1571 o2quo_conn_up(o2net_num_from_nn(nn));
1572 cancel_delayed_work(&nn->nn_still_up);
1573 atomic_set(&nn->nn_timeout, 0);
1574 }
1575
1563 /* Only push out an existing timer */ 1576 /* Only push out an existing timer */
1564 if (timer_pending(&sc->sc_idle_timeout)) 1577 if (timer_pending(&sc->sc_idle_timeout))
1565 o2net_sc_reset_idle_timer(sc); 1578 o2net_sc_reset_idle_timer(sc);