[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [DLM][PATCH] keep from adding the local IP to dlm_local_addr again



Hello,

This should be it for the lockspace weirdness patches.  When we go to initialize
the lowcomms stuff for a second time when using TCP, it fails complaining about
not being able to work on a multihoned machine.  This is because we've already
increased the dlm_local_count before when we did this the first time.  This
patch fixes this problem by only searching for our local address if we haven't
already gotten it.  Thank you,

Josef

Signed-off-by: Josef Bacik <jwhiter redhat com>

diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 2b32f3c..4843a4b 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -131,7 +131,7 @@ struct writequeue_entry {
 };
 
 static struct sockaddr_storage *dlm_local_addr[DLM_MAX_ADDR_COUNT];
-static int dlm_local_count;
+static int dlm_local_count = 0;
 
 /* Work queues */
 static struct workqueue_struct *recv_workqueue;
@@ -1424,10 +1424,12 @@ int dlm_lowcomms_start(void)
 	int error = -EINVAL;
 	struct connection *con;
 
-	init_local();
 	if (!dlm_local_count) {
-		log_print("no local IP address has been set");
-		goto out;
+		init_local();
+		if (!dlm_local_count) {
+			log_print("no local IP address has been set");
+			goto out;
+		}
 	}
 
 	error = -ENOMEM;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]