[Ocfs2-commits] khackel commits r2453 - trunk/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Jul 1 15:48:57 CDT 2005


Author: khackel
Signed-off-by: mfasheh
Date: 2005-07-01 15:48:56 -0500 (Fri, 01 Jul 2005)
New Revision: 2453

Modified:
   trunk/fs/ocfs2/dlm/dlmmaster.c
Log:
* completes fix of bug 411, crash on simultaneous umount
* ensures that every lockres that gets migrated is re-evaluated
  (marked dirty again) on the new master
* -ENOPROTOOPT can be thrown from a node which finishes unmounting
  just after a node decides to send a message, so add that to
  our handler

Signed-off-by: mfasheh



Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c	2005-07-01 19:56:54 UTC (rev 2452)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c	2005-07-01 20:48:56 UTC (rev 2453)
@@ -173,6 +173,7 @@
 		case -ENETUNREACH:
 		case -ENETRESET:
 		case -ESHUTDOWN:
+		case -ENOPROTOOPT:
 		case -EINVAL:   /* if returned from our tcp code,
 				   this means there is no socket */
 			return 1;
@@ -1764,6 +1765,7 @@
 
 	/*
 	 * set the MIGRATING flag and flush asts
+	 * if we fail after this we need to re-dirty the lockres
 	 */
 	dlm_mark_lockres_migrating(dlm, res);
 
@@ -1861,6 +1863,10 @@
 	ret = 0;
 
 leave:
+	/* re-dirty the lockres if we failed */
+	if (ret < 0)
+		dlm_kick_thread(dlm, res);
+
 	/* TODO: cleanup */
 	if (mres)
 		free_page((unsigned long)mres);
@@ -2357,6 +2363,8 @@
 	dlm_set_lockres_owner(dlm, res, dlm->node_num);
 	res->state &= ~DLM_LOCK_RES_MIGRATING;
 	spin_unlock(&res->spinlock);
+	/* re-dirty it on the new master */
+	dlm_kick_thread(dlm, res);
 	wake_up(&res->wq);
 leave:
 	return ret;



More information about the Ocfs2-commits mailing list