Skip to contentSkip to conversation

o2net: log socket state changes

Ocfs2-devel Srinivas Eeda 3 participants 3 messages Mar 31, 2010 – Apr 7, 2010 OCFS2

lore
Share & tools
lore
#0 lore raw

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
index 334f231..428af6d 100644
@@ -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 "o2net: 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;
 	}
Signature · 1 line
1.5.6.5
#1 lore raw
Quoted 22 lines · Srinivas Eeda

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
index 334f231..428af6d 100644
@@ -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 "o2net: 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;
 	}
#2 lore raw
In reply to Srinivas Eeda
Quoted 3 lines · Srinivas Eeda

This patch logs socket state changes that lead to socket shutdown.

This patch is now in the 'merge-window' branch of ocfs2.git. It
had two lines with trailing whitespace, which I corrected this time. Please verify your patches with checkpatch.pl in the future.

Joel

Signature · 10 lines
"In the beginning, the universe was created. This has made a lot 
 of people very angry, and is generally considered to have been a 
 bad move."
        - Douglas Adams

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127