[Ocfs2-commits] smushran commits r2897 - branches/ocfs2-1.2/fs/ocfs2/dlm

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Thu Apr 20 14:03:10 CDT 2006


Author: smushran
Signed-off-by: mfasheh
Signed-off-by: khackel
Date: 2006-04-20 14:03:09 -0500 (Thu, 20 Apr 2006)
New Revision: 2897

Modified:
   branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
Log:
Before checking for a nonexistent lock, make sure the lockres is not marked
RECOVERING. The caller will just retry and the state should be fixed up when
recovery completes.
Signed-off-by: mfasheh
Signed-off-by: khackel

Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c	2006-04-20 18:44:57 UTC (rev 2896)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmconvert.c	2006-04-20 19:03:09 UTC (rev 2897)
@@ -467,6 +467,12 @@
 	}
 
 	spin_lock(&res->spinlock);
+	status = __dlm_lockres_state_to_status(res);
+	if (status != DLM_NORMAL) {
+		spin_unlock(&res->spinlock);
+		dlm_error(status);
+		goto leave;
+	}
 	list_for_each(iter, &res->granted) {
 		lock = list_entry(iter, struct dlm_lock, list);
 		if (lock->ml.cookie == cnv->cookie &&
@@ -476,6 +482,20 @@
 		}
 		lock = NULL;
 	}
+	if (!lock) {
+		__dlm_print_one_lock_resource(res);
+		list_for_each(iter, &res->granted) {
+			lock = list_entry(iter, struct dlm_lock, list);
+			if (lock->ml.node == cnv->node_idx) {
+				mlog(0, "There is something here "
+				     "for node %u, lock->ml.cookie=%llu, "
+				     "cnv->cookie=%llu\n", cnv->node_idx,
+				     lock->ml.cookie, cnv->cookie);
+				break;
+			}
+		}
+		lock = NULL;
+	}
 	spin_unlock(&res->spinlock);
 	if (!lock) {
 		status = DLM_IVLOCKID;




More information about the Ocfs2-commits mailing list