[Ocfs2-commits] jlbec commits r2379 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 8 12:52:44 CDT 2005


Author: jlbec
Signed-off-by: mfasheh
Date: 2005-06-08 12:52:43 -0500 (Wed, 08 Jun 2005)
New Revision: 2379

Modified:
   trunk/fs/ocfs2/heartbeat.c
   trunk/fs/ocfs2/journal.c
   trunk/fs/ocfs2/super.c
   trunk/fs/ocfs2/vote.c
Log:


o Don't try to clean up when we don't have a DLM.
o Initialize the net response locks before we can get a response.
o Don't restart recovery when wait_on_mount() indictates mounting has
  failed.

Signed-off-by: mfasheh



Modified: trunk/fs/ocfs2/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/heartbeat.c	2005-06-08 01:03:31 UTC (rev 2378)
+++ trunk/fs/ocfs2/heartbeat.c	2005-06-08 17:52:43 UTC (rev 2379)
@@ -77,6 +77,16 @@
 
 	mlog(0, "ocfs2: node down event for %d\n", node_num);
 
+	if (!osb->dlm) {
+		/*
+		 * No DLM means we're not even ready to participate yet.
+		 * We check the slots after the DLM comes up, so we will
+		 * notice the node death then.  We can safely ignore it
+		 * here.
+		 */
+		return;
+	}
+
 	if (ocfs2_node_map_test_bit(osb, &osb->umount_map, node_num)) {
 		/* If a node is in the umount map, then we've been
 		 * expecting him to go down and we know ahead of time

Modified: trunk/fs/ocfs2/journal.c
===================================================================
--- trunk/fs/ocfs2/journal.c	2005-06-08 01:03:31 UTC (rev 2378)
+++ trunk/fs/ocfs2/journal.c	2005-06-08 17:52:43 UTC (rev 2379)
@@ -982,8 +982,6 @@
 
 	status = ocfs2_wait_on_mount(osb);
 	if (status < 0) {
-		if (status == -EBUSY)
-			status = 0;
 		goto bail;
 	}
 
@@ -1024,7 +1022,8 @@
 
 bail:
 	down(&osb->recovery_lock);
-	if (!ocfs2_node_map_is_empty(osb, &osb->recovery_map)) {
+	if (!status &&
+	    !ocfs2_node_map_is_empty(osb, &osb->recovery_map)) {
 		up(&osb->recovery_lock);
 		goto restart;
 	}

Modified: trunk/fs/ocfs2/super.c
===================================================================
--- trunk/fs/ocfs2/super.c	2005-06-08 01:03:31 UTC (rev 2378)
+++ trunk/fs/ocfs2/super.c	2005-06-08 17:52:43 UTC (rev 2379)
@@ -1052,6 +1052,10 @@
 
 	mlog_entry_void();
 
+	osb->net_response_ids = 0;
+	spin_lock_init(&osb->net_response_lock);
+	INIT_LIST_HEAD(&osb->net_response_list);
+
 	INIT_LIST_HEAD(&osb->osb_net_handlers);
 	init_waitqueue_head(&osb->recovery_event);
 	spin_lock_init(&osb->vote_task_lock);
@@ -1210,6 +1214,7 @@
 		status = -ENOMEM;
 		goto bail;
 	}
+	memcpy(&osb->net_key, &osb->uuid[i], sizeof(osb->net_key));
 
 	strncpy(osb->vol_label, di->id2.i_super.s_label, 63);
 	osb->vol_label[63] = '\0';

Modified: trunk/fs/ocfs2/vote.c
===================================================================
--- trunk/fs/ocfs2/vote.c	2005-06-08 01:03:31 UTC (rev 2378)
+++ trunk/fs/ocfs2/vote.c	2005-06-08 17:52:43 UTC (rev 2379)
@@ -978,11 +978,6 @@
 	int i = OCFS2_VOL_UUID_LEN - sizeof(osb->net_key);
 	int status = 0;
 
-	memcpy(&osb->net_key, &osb->uuid[i], sizeof(osb->net_key));
-	osb->net_response_ids = 0;
-	spin_lock_init(&osb->net_response_lock);
-	INIT_LIST_HEAD(&osb->net_response_list);
-
 	status = o2net_register_handler(OCFS2_MESSAGE_TYPE_RESPONSE,
 					osb->net_key,
 					sizeof(ocfs2_response_msg),



More information about the Ocfs2-commits mailing list