cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] dlm: fix socket shutdown
@ 2007-06-01 15:07 David Teigland
  2007-06-04  8:50 ` [Cluster-devel] " Steven Whitehouse
  0 siblings, 1 reply; 3+ messages in thread
From: David Teigland @ 2007-06-01 15:07 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Patrick Caulfield <pcaulfie@redhat.com>

This patch clears the user_data of active sockets as part of cleanup.
This prevents any late-arriving data from trying to add jobs to the work
queue while we are tidying up.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-Off-By: David Teigland <teigland@redhat.com>

Index: linux-quilt/fs/dlm/lowcomms.c
===================================================================
--- linux-quilt.orig/fs/dlm/lowcomms.c	2007-05-25 14:56:42.000000000 -0500
+++ linux-quilt/fs/dlm/lowcomms.c	2007-06-01 10:04:03.000000000 -0500
@@ -260,7 +260,7 @@
 static void lowcomms_data_ready(struct sock *sk, int count_unused)
 {
 	struct connection *con = sock2con(sk);
-	if (!test_and_set_bit(CF_READ_PENDING, &con->flags))
+	if (con && !test_and_set_bit(CF_READ_PENDING, &con->flags))
 		queue_work(recv_workqueue, &con->rwork);
 }
 
@@ -268,7 +268,7 @@
 {
 	struct connection *con = sock2con(sk);
 
-	if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
+	if (con && !test_and_set_bit(CF_WRITE_PENDING, &con->flags))
 		queue_work(send_workqueue, &con->swork);
 }
 
@@ -1400,8 +1400,11 @@
 	down(&connections_lock);
 	for (i = 0; i <= max_nodeid; i++) {
 		con = __nodeid2con(i, 0);
-		if (con)
+		if (con) {
 			con->flags |= 0xFF;
+			if (con->sock)
+				con->sock->sk->sk_user_data = NULL;
+		}
 	}
 	up(&connections_lock);
 



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

* [Cluster-devel] Re: [PATCH] dlm: fix socket shutdown
  2007-06-01 15:07 [Cluster-devel] [PATCH] dlm: fix socket shutdown David Teigland
@ 2007-06-04  8:50 ` Steven Whitehouse
  0 siblings, 0 replies; 3+ messages in thread
From: Steven Whitehouse @ 2007-06-04  8:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now applied to the -nmw git tree. Thanks,

Steve.

On Fri, 2007-06-01 at 10:07 -0500, David Teigland wrote:
> From: Patrick Caulfield <pcaulfie@redhat.com>
> 
> This patch clears the user_data of active sockets as part of cleanup.
> This prevents any late-arriving data from trying to add jobs to the work
> queue while we are tidying up.
> 
> Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
> Signed-Off-By: David Teigland <teigland@redhat.com>
> 
> Index: linux-quilt/fs/dlm/lowcomms.c
> ===================================================================
> --- linux-quilt.orig/fs/dlm/lowcomms.c	2007-05-25 14:56:42.000000000 -0500
> +++ linux-quilt/fs/dlm/lowcomms.c	2007-06-01 10:04:03.000000000 -0500
> @@ -260,7 +260,7 @@
>  static void lowcomms_data_ready(struct sock *sk, int count_unused)
>  {
>  	struct connection *con = sock2con(sk);
> -	if (!test_and_set_bit(CF_READ_PENDING, &con->flags))
> +	if (con && !test_and_set_bit(CF_READ_PENDING, &con->flags))
>  		queue_work(recv_workqueue, &con->rwork);
>  }
>  
> @@ -268,7 +268,7 @@
>  {
>  	struct connection *con = sock2con(sk);
>  
> -	if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
> +	if (con && !test_and_set_bit(CF_WRITE_PENDING, &con->flags))
>  		queue_work(send_workqueue, &con->swork);
>  }
>  
> @@ -1400,8 +1400,11 @@
>  	down(&connections_lock);
>  	for (i = 0; i <= max_nodeid; i++) {
>  		con = __nodeid2con(i, 0);
> -		if (con)
> +		if (con) {
>  			con->flags |= 0xFF;
> +			if (con->sock)
> +				con->sock->sk->sk_user_data = NULL;
> +		}
>  	}
>  	up(&connections_lock);
>  



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

* [Cluster-devel] [PATCH] [DLM] fix socket shutdown
  2007-07-09 16:02                                                 ` [Cluster-devel] [PATCH] [GFS2] Make the log reserved blocks depend on block size swhiteho
@ 2007-07-09 16:02                                                   ` swhiteho
  0 siblings, 0 replies; 3+ messages in thread
From: swhiteho @ 2007-07-09 16:02 UTC (permalink / raw)
  To: cluster-devel.redhat.com

From: Patrick Caulfield <pcaulfie@redhat.com>

This patch clears the user_data of active sockets as part of cleanup.
This prevents any late-arriving data from trying to add jobs to the work
queue while we are tidying up.

Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
Signed-Off-By: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 27970a5..fc0bff7 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -260,7 +260,7 @@ static int nodeid_to_addr(int nodeid, struct sockaddr *retaddr)
 static void lowcomms_data_ready(struct sock *sk, int count_unused)
 {
 	struct connection *con = sock2con(sk);
-	if (!test_and_set_bit(CF_READ_PENDING, &con->flags))
+	if (con && !test_and_set_bit(CF_READ_PENDING, &con->flags))
 		queue_work(recv_workqueue, &con->rwork);
 }
 
@@ -268,7 +268,7 @@ static void lowcomms_write_space(struct sock *sk)
 {
 	struct connection *con = sock2con(sk);
 
-	if (!test_and_set_bit(CF_WRITE_PENDING, &con->flags))
+	if (con && !test_and_set_bit(CF_WRITE_PENDING, &con->flags))
 		queue_work(send_workqueue, &con->swork);
 }
 
@@ -1400,8 +1400,11 @@ void dlm_lowcomms_stop(void)
 	down(&connections_lock);
 	for (i = 0; i <= max_nodeid; i++) {
 		con = __nodeid2con(i, 0);
-		if (con)
+		if (con) {
 			con->flags |= 0xFF;
+			if (con->sock)
+				con->sock->sk->sk_user_data = NULL;
+		}
 	}
 	up(&connections_lock);
 
-- 
1.5.1.2



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

end of thread, other threads:[~2007-07-09 16:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-01 15:07 [Cluster-devel] [PATCH] dlm: fix socket shutdown David Teigland
2007-06-04  8:50 ` [Cluster-devel] " Steven Whitehouse
  -- strict thread matches above, loose matches on Subject: below --
2007-07-09 16:02 [Cluster-devel] [GFS2/DLM] Pre-pull Patch Posting swhiteho
2007-07-09 16:02 ` [Cluster-devel] [PATCH] [GFS2] flush the glock completely in inode_go_sync swhiteho
2007-07-09 16:02   ` [Cluster-devel] [PATCH] [DLM] fix a couple of races swhiteho
2007-07-09 16:02     ` [Cluster-devel] [PATCH] [GFS2] kernel changes to support new gfs2_grow command swhiteho
2007-07-09 16:02       ` [Cluster-devel] [PATCH] [GFS2] Kernel changes to support new gfs2_grow command (part 2) swhiteho
2007-07-09 16:02         ` [Cluster-devel] [PATCH] [GFS2] use zero_user_page swhiteho
2007-07-09 16:02           ` [Cluster-devel] [PATCH] [GFS2] Addendum patch 2 for gfs2_grow swhiteho
2007-07-09 16:02             ` [Cluster-devel] [PATCH] [GFS2] Reduce size of struct gdlm_lock swhiteho
2007-07-09 16:02               ` [Cluster-devel] [PATCH] [GFS2] Clean up inode number handling swhiteho
2007-07-09 16:02                 ` [Cluster-devel] [PATCH] [GFS2] Quotas non-functional - fix bug swhiteho
2007-07-09 16:02                   ` [Cluster-devel] [PATCH] [DLM] keep dlm from panicing when traversing rsb list in debugfs swhiteho
2007-07-09 16:02                     ` [Cluster-devel] [PATCH] [DLM] block scand during recovery [1/6] swhiteho
2007-07-09 16:02                       ` [Cluster-devel] [PATCH] [DLM] add lock timeouts and warnings [2/6] swhiteho
2007-07-09 16:02                         ` [Cluster-devel] [PATCH] [DLM] dlm_device interface changes [3/6] swhiteho
2007-07-09 16:02                           ` [Cluster-devel] [PATCH] [DLM] cancel in conversion deadlock [4/6] swhiteho
2007-07-09 16:02                             ` [Cluster-devel] [PATCH] [DLM] fix new_lockspace error exit [5/6] swhiteho
2007-07-09 16:02                               ` [Cluster-devel] [PATCH] [DLM] wait for config check during join [6/6] swhiteho
2007-07-09 16:02                                 ` [Cluster-devel] [PATCH] [DLM] fix compile breakage swhiteho
2007-07-09 16:02                                   ` [Cluster-devel] [PATCH] [GFS2] latest gfs2-nmw headers break userland build swhiteho
2007-07-09 16:02                                     ` [Cluster-devel] [PATCH] [DLM] Compile fix swhiteho
2007-07-09 16:02                                       ` [Cluster-devel] [PATCH] [DLM] timeout fixes swhiteho
2007-07-09 16:02                                         ` [Cluster-devel] [PATCH] [DLM] canceling deadlocked lock swhiteho
2007-07-09 16:02                                           ` [Cluster-devel] [PATCH] [DLM] dumping master locks swhiteho
2007-07-09 16:02                                             ` [Cluster-devel] [PATCH] [DLM] show default protocol swhiteho
2007-07-09 16:02                                               ` [Cluster-devel] [PATCH] [GFS2] Quotas non-functional - fix another bug swhiteho
2007-07-09 16:02                                                 ` [Cluster-devel] [PATCH] [GFS2] Make the log reserved blocks depend on block size swhiteho
2007-07-09 16:02                                                   ` [Cluster-devel] [PATCH] [DLM] fix socket shutdown swhiteho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).