All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] o2net: log socket state changes
@ 2010-03-31  1:27 Srinivas Eeda
  2010-03-31 18:51 ` Sunil Mushran
  0 siblings, 1 reply; 8+ messages in thread
From: Srinivas Eeda @ 2010-03-31  1:27 UTC (permalink / raw)
  To: ocfs2-devel

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

Signed-off-by: Srinivas Eeda <srinivas.eeda@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..6d0d228 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 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;
 	}
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31  1:27 [Ocfs2-devel] o2net: log socket state changes Srinivas Eeda
@ 2010-03-31 18:51 ` Sunil Mushran
  2010-03-31 19:03   ` Sunil Mushran
  0 siblings, 1 reply; 8+ messages in thread
From: Sunil Mushran @ 2010-03-31 18:51 UTC (permalink / raw)
  To: ocfs2-devel

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


Srinivas Eeda wrote:
> This patch logs socket state changes that lead to socket shutdown.
>
> Signed-off-by: Srinivas Eeda <srinivas.eeda@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..6d0d228 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 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;
>  	}

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31 18:51 ` Sunil Mushran
@ 2010-03-31 19:03   ` Sunil Mushran
  0 siblings, 0 replies; 8+ messages in thread
From: Sunil Mushran @ 2010-03-31 19:03 UTC (permalink / raw)
  To: ocfs2-devel

Can you also provide a snippet of the messages after some mounts
and umounts.

Sunil Mushran wrote:
> 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
>
>
> Srinivas Eeda wrote:
>   
>> This patch logs socket state changes that lead to socket shutdown.
>>
>> Signed-off-by: Srinivas Eeda <srinivas.eeda@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..6d0d228 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 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
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31 21:07 [Ocfs2-devel] o2net patch to lock socket shutdown message Srinivas Eeda
@ 2010-03-31 21:07 ` Srinivas Eeda
  2010-03-31 21:25   ` Sunil Mushran
  0 siblings, 1 reply; 8+ messages in thread
From: Srinivas Eeda @ 2010-03-31 21:07 UTC (permalink / raw)
  To: ocfs2-devel

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

Signed-off-by: Srinivas Eeda <srinivas.eeda@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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31 21:07 ` [Ocfs2-devel] o2net: log socket state changes Srinivas Eeda
@ 2010-03-31 21:25   ` Sunil Mushran
  0 siblings, 0 replies; 8+ messages in thread
From: Sunil Mushran @ 2010-03-31 21:25 UTC (permalink / raw)
  To: ocfs2-devel

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@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;
>  	}
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
@ 2010-03-31 21:32 Srinivas Eeda
  2010-03-31 21:50 ` Sunil Mushran
  2010-04-07  1:19 ` Joel Becker
  0 siblings, 2 replies; 8+ messages in thread
From: Srinivas Eeda @ 2010-03-31 21:32 UTC (permalink / raw)
  To: ocfs2-devel

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

Signed-off-by: Srinivas Eeda <srinivas.eeda@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..428af6d 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 "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;
 	}
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31 21:32 Srinivas Eeda
@ 2010-03-31 21:50 ` Sunil Mushran
  2010-04-07  1:19 ` Joel Becker
  1 sibling, 0 replies; 8+ messages in thread
From: Sunil Mushran @ 2010-03-31 21:50 UTC (permalink / raw)
  To: ocfs2-devel

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>

Srinivas Eeda wrote:
> This patch logs socket state changes that lead to socket shutdown.
>
> Signed-off-by: Srinivas Eeda <srinivas.eeda@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..428af6d 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 "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;
>  	}
>   

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Ocfs2-devel] o2net: log socket state changes
  2010-03-31 21:32 Srinivas Eeda
  2010-03-31 21:50 ` Sunil Mushran
@ 2010-04-07  1:19 ` Joel Becker
  1 sibling, 0 replies; 8+ messages in thread
From: Joel Becker @ 2010-04-07  1:19 UTC (permalink / raw)
  To: ocfs2-devel

On Wed, Mar 31, 2010 at 02:32:29PM -0700, Srinivas Eeda wrote:
> This patch logs socket state changes that lead to socket shutdown.
> 
> Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>

	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

-- 

"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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-04-07  1:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31  1:27 [Ocfs2-devel] o2net: log socket state changes Srinivas Eeda
2010-03-31 18:51 ` Sunil Mushran
2010-03-31 19:03   ` Sunil Mushran
  -- strict thread matches above, loose matches on Subject: below --
2010-03-31 21:07 [Ocfs2-devel] o2net patch to lock socket shutdown message Srinivas Eeda
2010-03-31 21:07 ` [Ocfs2-devel] o2net: log socket state changes Srinivas Eeda
2010-03-31 21:25   ` Sunil Mushran
2010-03-31 21:32 Srinivas Eeda
2010-03-31 21:50 ` Sunil Mushran
2010-04-07  1:19 ` Joel Becker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.