[Ocfs2-commits] khackel commits r2798 - branches/ocfs2-1.2-cert/patches
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Wed Mar 29 03:40:25 CST 2006
Author: khackel
Signed-off-by: jlbec
Date: 2006-03-29 03:40:24 -0600 (Wed, 29 Mar 2006)
New Revision: 2798
Added:
branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch
Modified:
branches/ocfs2-1.2-cert/patches/series
Log:
add fix-remote-lock-during-reco.patch to handle node death of owner of recovery lockres
Signed-off-by: jlbec
Added: branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch 2006-03-29 02:24:35 UTC (rev 2797)
+++ branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch 2006-03-29 09:40:24 UTC (rev 2798)
@@ -0,0 +1,69 @@
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmlock.c 2006-03-29 00:01:04.294719000 -0800
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c 2006-03-29 01:37:56.571286000 -0800
+@@ -226,7 +226,16 @@
+ res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
+ lock->lock_pending = 0;
+ if (status != DLM_NORMAL) {
+- if (status != DLM_NOTQUEUED) {
++ if (status == DLM_RECOVERING &&
++ dlm_is_recovery_lock(res->lockname.name,
++ res->lockname.len)) {
++ /* recovery lock was mastered by dead node.
++ * we need to have calc_usage shoot down this
++ * lockres and completely remaster it. */
++ mlog(ML_NOTICE, "%s: recovery lock was owned by "
++ "dead node %u, remaster it now.\n",
++ dlm->name, res->owner);
++ } else if (status != DLM_NOTQUEUED) {
+ /*
+ * DO NOT call calc_usage, as this would unhash
+ * the remote lockres before we ever get to use
+@@ -691,18 +700,22 @@
+ msleep(100);
+ /* no waiting for dlm_reco_thread */
+ if (recovery) {
+- if (status == DLM_RECOVERING) {
+- mlog(0, "%s: got RECOVERING "
+- "for $REOCVERY lock, master "
+- "was %u\n", dlm->name,
+- res->owner);
+- dlm_wait_for_node_death(dlm, res->owner,
+- DLM_NODE_DEATH_WAIT_MAX);
+- }
++ if (status != DLM_RECOVERING)
++ goto retry_lock;
++
++ mlog(0, "%s: got RECOVERING "
++ "for $RECOVERY lock, master "
++ "was %u\n", dlm->name,
++ res->owner);
++ /* wait to see the node go down, then
++ * drop down and allow the lockres to
++ * get cleaned up. need to remaster. */
++ dlm_wait_for_node_death(dlm, res->owner,
++ DLM_NODE_DEATH_WAIT_MAX);
+ } else {
+ dlm_wait_for_recovery(dlm);
++ goto retry_lock;
+ }
+- goto retry_lock;
+ }
+
+ if (status != DLM_NORMAL) {
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-03-29 00:01:03.768807000 -0800
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c 2006-03-29 01:07:50.417523000 -0800
+@@ -2427,6 +2427,10 @@
+ mlog(ML_NOTICE, "%s: reco master %u is ready to recover %u\n",
+ dlm->name, dlm->reco.new_master, dlm->reco.dead_node);
+ status = -EEXIST;
++ } else if (ret == DLM_RECOVERING) {
++ mlog(ML_NOTICE, "dlm=%s dlmlock says master node died (this=%u)\n",
++ dlm->name, dlm->node_num);
++ goto again;
+ } else {
+ struct dlm_lock_resource *res;
+
Modified: branches/ocfs2-1.2-cert/patches/series
===================================================================
--- branches/ocfs2-1.2-cert/patches/series 2006-03-29 02:24:35 UTC (rev 2797)
+++ branches/ocfs2-1.2-cert/patches/series 2006-03-29 09:40:24 UTC (rev 2798)
@@ -19,3 +19,4 @@
ocfs2_heartbeat-better_I_O_error_handling.patch -p0
never-purge-master.patch
reassert-vs-migration.patch
+fix-remote-lock-during-reco.patch
More information about the Ocfs2-commits
mailing list