o2net: log socket state changes
This patch logs socket state changes that lead to socket shutdown.
--- fs/ocfs2/cluster/tcp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/cluster/tcp.c +3 -0
@@ -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 SC_NODEF_FMT " socket state" +" changed to %d. Shutting down the socket " + "connection\n", SC_NODEF_ARGS(sc), sk->sk_state);o2net_sc_queue_work (sc, &sc->sc_shutdown_work);break ; }
Signature · 1 line
1.5.6.5
KERN_INFO is a good idea. But the message is a mouthful.
Currently it reads:
"node %s (num %u) at %u.%u.%u.%u:%u socket state changed to X. Shutting down the socket connection"
How about this:
"o2net: connection to node %s (num %u) at %u.%u.%u.%u:%u shutdown, state %d"
printk(KERN_INFO "connection to " SC_NODEF_FMT " shutdown, state %d" ....);
Sunil
Quoted 21 lines · Srinivas Eeda
This patch logs socket state changes that lead to socket shutdown.
Signed-off-by Srinivas Eeda <[email protected]>--- fs/ocfs2/cluster/tcp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/cluster/tcp.c +3
-0@@ -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 SC_NODEF_FMT " socket state" +" changed to %d. Shutting down the socket " + "connection\n", SC_NODEF_ARGS(sc), sk->sk_state);o2net_sc_queue_work (sc, &sc->sc_shutdown_work);break ; }
Can you also provide a snippet of the messages after some mounts and umounts.
Quoted 45 lines · Sunil Mushran
KERN_INFOis a good idea. But the message is a mouthful.Currently it reads:
"node %s (num %u) at %u.%u.%u.%u:%u socket state changed to X. Shutting down the socket connection"How about this:
"o2net: connection to node %s (num %u) at %u.%u.%u.%u:%u shutdown, state %d"
printk(KERN_INFO "connection to " SC_NODEF_FMT " shutdown, state %d" ....);Sunil
Quoted 13 lines · Srinivas Eeda
This patch logs socket state changes that lead to socket shutdown.
Signed-off-by Srinivas Eeda <[email protected]>--- fs/ocfs2/cluster/tcp.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)fs/ocfs2/cluster/tcp.c +0
-0fs/ocfs2/cluster/tcp.c static void o2net_state_change(struct sock *sk) · line 591
Quoted 9 lines
fs/ocfs2/cluster/tcp.c +3
-0@@ -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 SC_NODEF_FMT " socket state" +" changed to %d. Shutting down the socket " + "connection\n", SC_NODEF_ARGS(sc), sk->sk_state);o2net_sc_queue_work (sc, &sc->sc_shutdown_work);break ; }_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel