[Ocfs2-commits] khackel commits r2836 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Tue Apr 11 17:58:04 CDT 2006


Author: khackel
Signed-off-by: mfasheh
Date: 2006-04-11 17:58:03 -0500 (Tue, 11 Apr 2006)
New Revision: 2836

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
Log:
* recheck the lockres master before sending an unlock request.  recovery may have happened and it 
  may now be mastered locally.

Signed-off-by: mfasheh


Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c	2006-04-11 22:53:04 UTC (rev 2835)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmunlock.c	2006-04-11 22:58:03 UTC (rev 2836)
@@ -318,6 +318,16 @@
 	size_t veclen = 1;
 
 	mlog_entry("%.*s\n", res->lockname.len, res->lockname.name);
+			
+	if (owner == dlm->node_num) {
+		/* ended up trying to contact ourself.  this means
+		 * that the lockres had been remote but became local
+		 * via a migration.  just retry it, now as local */
+		mlog(0, "%s:%.*s: this node became the master due to a "
+		     "migration, re-evaluate now\n", dlm->name,
+		     res->lockname.len, res->lockname.name);
+		return DLM_FORWARD;
+	}
 
 	memset(&unlock, 0, sizeof(unlock));
 	unlock.node_idx = dlm->node_num;




More information about the Ocfs2-commits mailing list