Srinivas Eeda
2010-Mar-31 21:07 UTC
[Ocfs2-devel] o2net patch to lock socket shutdown message
The following patch logs socket shutdown messages. Below is the snippet of how the message looks (new message ends with "... shutdown, state #") [root at el532p-3 ~]# mount /dev/hdb /vol1 Mar 31 11:14:18 el532p-3 kernel: connection to node el532p-2 (num 64) at 10.35.70.104:7777 shutdown, state 8 Mar 31 11:14:18 el532p-3 kernel: connection to node el532p-2 (num 64) at 10.35.70.104:7777 shutdown, state 7 Mar 31 11:14:20 el532p-3 kernel: o2net: connected to node el532p-2 (num 64) at 10.35.70.104:7777 Mar 31 11:14:20 el532p-3 kernel: connection to node el532p-1 (num 63) at 10.35.70.103:7777 shutdown, state 8 Mar 31 11:14:20 el532p-3 kernel: o2net: accepted connection from node el532p-4 (num 66) at 10.35.70.106:7777 Mar 31 11:14:22 el532p-3 kernel: o2net: connected to node el532p-1 (num 63) at 10.35.70.103:7777 Mar 31 11:14:25 el532p-3 kernel: svc: failed to register lockdv1 RPC service (errno 97). [root at el532p-3 ~]# Mar 31 11:14:27 el532p-3 kernel: OCFS2 1.5.0 Mar 31 11:14:27 el532p-3 kernel: ocfs2_dlm: Nodes in domain ("B940154B0B044964BC649D7717B21B19"): 64 65 66 Mar 31 11:14:27 el532p-3 kernel: ocfs2: Mounting device (3,64) on (node 65, slot 2) with ordered data mode. Mar 31 11:14:28 el532p-3 kernel: ocfs2_dlm: Node 63 joins domain B940154B0B044964BC649D7717B21B19 Mar 31 11:14:28 el532p-3 kernel: ocfs2_dlm: Nodes in domain ("B940154B0B044964BC649D7717B21B19"): 63 64 65 66
This patch logs socket state changes that lead to socket shutdown. Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com> --- fs/ocfs2/cluster/tcp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 334f231..8bda1ea 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c @@ -583,6 +583,9 @@ static void o2net_state_change(struct sock *sk) o2net_sc_queue_work(sc, &sc->sc_connect_work); break; default: + printk(KERN_INFO "connection to " SC_NODEF_FMT + " shutdown, state %d\n", + SC_NODEF_ARGS(sc), sk->sk_state); o2net_sc_queue_work(sc, &sc->sc_shutdown_work); break; } -- 1.5.6.5
Please can you prepend "o2net: " to the message. Easier to grep. Srinivas Eeda wrote:> This patch logs socket state changes that lead to socket shutdown. > > Signed-off-by: Srinivas Eeda <srinivas.eeda at oracle.com> > --- > fs/ocfs2/cluster/tcp.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c > index 334f231..8bda1ea 100644 > --- a/fs/ocfs2/cluster/tcp.c > +++ b/fs/ocfs2/cluster/tcp.c > @@ -583,6 +583,9 @@ static void o2net_state_change(struct sock *sk) > o2net_sc_queue_work(sc, &sc->sc_connect_work); > break; > default: > + printk(KERN_INFO "connection to " SC_NODEF_FMT > + " shutdown, state %d\n", > + SC_NODEF_ARGS(sc), sk->sk_state); > o2net_sc_queue_work(sc, &sc->sc_shutdown_work); > break; > } >