[Ocfs2-commits] khackel commits r2842 - branches/ocfs2-1.2-cert/patches
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Tue Apr 18 16:34:21 CDT 2006
Author: khackel
Signed-off-by: jlbec
Date: 2006-04-18 16:34:14 -0500 (Tue, 18 Apr 2006)
New Revision: 2842
Added:
branches/ocfs2-1.2-cert/patches/dlm-add-migration-delay.patch
branches/ocfs2-1.2-cert/patches/dlm-allow-for-assert-while-in-progress.patch
branches/ocfs2-1.2-cert/patches/dlm-allow-recovery-to-start.patch
branches/ocfs2-1.2-cert/patches/dlm-catch-bad-reco-state.patch
branches/ocfs2-1.2-cert/patches/dlm-cleanup-reco-state-changes.patch
branches/ocfs2-1.2-cert/patches/dlm-detach-from-hb-events.patch
branches/ocfs2-1.2-cert/patches/dlm-fix-dlm_is_node_dead.patch
branches/ocfs2-1.2-cert/patches/dlm-fix-lvb-empty-check.patch
branches/ocfs2-1.2-cert/patches/dlm-fix-migration-asserts.patch
branches/ocfs2-1.2-cert/patches/dlm-fix-mle-refcount-while-inuse.patch
branches/ocfs2-1.2-cert/patches/dlm-handle-reco-network-errors.patch
branches/ocfs2-1.2-cert/patches/dlm-init-mle-when-used.patch
branches/ocfs2-1.2-cert/patches/dlm-mastery-debug-mlogs.patch
branches/ocfs2-1.2-cert/patches/dlm-mle-debugging.patch
branches/ocfs2-1.2-cert/patches/dlm-recheck-master-on-unlock.patch
branches/ocfs2-1.2-cert/patches/dlm-reco-debug-mlogs.patch
Modified:
branches/ocfs2-1.2-cert/patches/continue-finalize-reco.patch
branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch
branches/ocfs2-1.2-cert/patches/debug-mastery.patch
branches/ocfs2-1.2-cert/patches/dlm-eloop.patch
branches/ocfs2-1.2-cert/patches/dlm-fix_dlm_lock_reco_handling.patch
branches/ocfs2-1.2-cert/patches/dlm-mlog_to_printk
branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry
branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs
branches/ocfs2-1.2-cert/patches/fix-death-during-recovery.patch
branches/ocfs2-1.2-cert/patches/fix-dlmlock_remote.patch
branches/ocfs2-1.2-cert/patches/fix-purge-lockres.patch
branches/ocfs2-1.2-cert/patches/fix-recovery-spin.patch
branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch
branches/ocfs2-1.2-cert/patches/fix-wait-in-mastery.patch
branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes
branches/ocfs2-1.2-cert/patches/hold-dirty-ref.patch
branches/ocfs2-1.2-cert/patches/hold-recovery-ref.patch
branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs
branches/ocfs2-1.2-cert/patches/lockres-release-info.patch
branches/ocfs2-1.2-cert/patches/lvb-recovery-fix.patch
branches/ocfs2-1.2-cert/patches/mar24-create-lock-handler.patch
branches/ocfs2-1.2-cert/patches/mastery-restart-recovery.patch
branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch
branches/ocfs2-1.2-cert/patches/never-purge-master.patch
branches/ocfs2-1.2-cert/patches/ocfs2-1.2-no-idr-0.patch
branches/ocfs2-1.2-cert/patches/ocfs2-extend_tracing2.patch
branches/ocfs2-1.2-cert/patches/ocfs2-journal_start_stop_msgs.patch
branches/ocfs2-1.2-cert/patches/ocfs2-reco_nofs.patch
branches/ocfs2-1.2-cert/patches/ocfs2_dlm-do_lvb_puts_inline2.patch
branches/ocfs2-1.2-cert/patches/ocfs2_heartbeat-better_I_O_error_handling.patch
branches/ocfs2-1.2-cert/patches/reassert-vs-migration.patch
branches/ocfs2-1.2-cert/patches/remove-bad-spin-unlock.patch
branches/ocfs2-1.2-cert/patches/series
branches/ocfs2-1.2-cert/patches/two-stage-finalize.patch
Log:
break out mar20-full-3.patch
Signed-off-by: jlbec
Modified: branches/ocfs2-1.2-cert/patches/continue-finalize-reco.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/continue-finalize-reco.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/continue-finalize-reco.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-03-31 16:59:38.553006000 -0800
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c 2006-03-31 17:56:10.521060000 -0800
-@@ -2653,6 +2653,7 @@
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:32.211928000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:34.956962000 -0700
+@@ -2652,6 +2652,7 @@
mlog(ML_ERROR, "node %u went down after this "
"node finished recovery.\n", nodenum);
ret = 0;
Modified: branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/debug-bad-recovery.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/dlm/dlmconvert.c
+Index: cert3/fs/ocfs2/dlm/dlmconvert.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmconvert.c 2006-04-07 13:41:18.858200000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmconvert.c 2006-04-07 13:50:57.070240000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmconvert.c 2006-04-18 14:00:56.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmconvert.c 2006-04-18 14:27:24.543984000 -0700
@@ -467,6 +467,12 @@
}
@@ -36,20 +36,19 @@
spin_unlock(&res->spinlock);
if (!lock) {
status = DLM_IVLOCKID;
-Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-07 13:49:28.604440000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c 2006-04-07 13:50:57.085240000 -0700
-@@ -494,7 +494,7 @@
- dlm->reco.dead_node);
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:20:20.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:29:23.275666000 -0700
+@@ -495,6 +495,7 @@
//dlm_print_reco_junk(dlm);
}
--
+
+#if 0
while (1) {
- if (wait_event_timeout(dlm->reco.event,
- !dlm_in_recovery(dlm),
-@@ -507,7 +507,8 @@
+ if (wait_event_timeout(dlm->reco.event,
+ !dlm_in_recovery(dlm),
+@@ -507,7 +508,8 @@
dlm->reco.dead_node);
//dlm_print_reco_junk(dlm);
}
@@ -59,7 +58,7 @@
}
static void dlm_begin_recovery(struct dlm_ctxt *dlm)
-@@ -758,12 +759,11 @@
+@@ -758,12 +760,11 @@
break;
case DLM_RECO_NODE_DATA_RECEIVING:
case DLM_RECO_NODE_DATA_REQUESTED:
@@ -76,10 +75,10 @@
mlog(mlg, "%s: node %u still in state %s\n",
dlm->name, ndata->node_num,
ndata->state==DLM_RECO_NODE_DATA_RECEIVING ?
-Index: cert2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-07 13:41:18.939200000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmmaster.c 2006-04-07 13:50:57.101240000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:20:20.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:27:25.030693000 -0700
@@ -1694,13 +1694,13 @@
tmpret = o2net_send_message(DLM_ASSERT_MASTER_MSG, dlm->key,
&assert, sizeof(assert), to, &r);
Modified: branches/ocfs2-1.2-cert/patches/debug-mastery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/debug-mastery.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/debug-mastery.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-03-21 13:11:58.618620000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c 2006-03-21 13:19:43.675820000 -0800
-@@ -1621,6 +1621,8 @@ again:
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:00:58.839560000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:01:01.467762000 -0700
+@@ -1621,6 +1621,8 @@
dlm_node_iter_init(nodemap, &iter);
while ((to = dlm_node_iter_next(&iter)) >= 0) {
int r = 0;
@@ -11,7 +11,7 @@
mlog(0, "sending assert master to %d (%.*s)\n", to,
namelen, lockname);
memset(&assert, 0, sizeof(assert));
-@@ -1645,7 +1647,16 @@ again:
+@@ -1645,7 +1647,16 @@
/* ok, something horribly messed. kill thyself. */
mlog(ML_ERROR,"during assert master of %.*s to %u, "
"got %d.\n", namelen, lockname, to, r);
@@ -29,7 +29,7 @@
BUG();
} else if (r == EAGAIN) {
mlog(0, "%.*s: node %u create mles on other "
-@@ -1909,12 +1920,13 @@ done:
+@@ -1909,12 +1920,13 @@
kill:
/* kill the caller! */
Added: branches/ocfs2-1.2-cert/patches/dlm-add-migration-delay.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-add-migration-delay.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-add-migration-delay.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,32 @@
+Index: cert3/fs/ocfs2/dlm/dlmthread.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-17 16:06:38.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmthread.c 2006-04-17 16:23:51.218905000 -0700
+@@ -39,6 +39,7 @@
+ #include <linux/inet.h>
+ #include <linux/timer.h>
+ #include <linux/kthread.h>
++#include <linux/delay.h>
+
+
+ #include "cluster/heartbeat.h"
+@@ -166,6 +167,7 @@
+ } else if (ret < 0) {
+ mlog(ML_NOTICE, "lockres %.*s: migrate failed, retrying\n",
+ lockres->lockname.len, lockres->lockname.name);
++ msleep(100);
+ goto again;
+ }
+
+@@ -658,8 +660,9 @@
+ * spinlock and do NOT have the dlm lock.
+ * safe to reserve/queue asts and run the lists. */
+
+- mlog(0, "calling dlm_shuffle_lists with dlm=%p, "
+- "res=%p\n", dlm, res);
++ mlog(0, "calling dlm_shuffle_lists with dlm=%s, "
++ "res=%.*s\n", dlm->name,
++ res->lockname.len, res->lockname.name);
+
+ /* called while holding lockres lock */
+ dlm_shuffle_lists(dlm, res);
Added: branches/ocfs2-1.2-cert/patches/dlm-allow-for-assert-while-in-progress.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-allow-for-assert-while-in-progress.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-allow-for-assert-while-in-progress.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,14 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:49:09.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:51:10.861562000 -0700
+@@ -1737,7 +1737,8 @@
+ goto kill;
+ }
+ if (!mle) {
+- if (res->owner != assert->node_idx) {
++ if (res->owner != DLM_LOCK_RES_OWNER_UNKNOWN &&
++ res->owner != assert->node_idx) {
+ mlog(ML_ERROR, "assert_master from "
+ "%u, but current owner is "
+ "%u! (%.*s)\n",
Added: branches/ocfs2-1.2-cert/patches/dlm-allow-recovery-to-start.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-allow-recovery-to-start.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-allow-recovery-to-start.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,12 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:41:49.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:44:57.764922000 -0700
+@@ -856,6 +856,7 @@
+ }
+
+ dlm_kick_recovery_thread(dlm);
++ msleep(100);
+ dlm_wait_for_recovery(dlm);
+
+ spin_lock(&dlm->spinlock);
Added: branches/ocfs2-1.2-cert/patches/dlm-catch-bad-reco-state.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-catch-bad-reco-state.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-catch-bad-reco-state.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,64 @@
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:36:08.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:45:42.476500000 -0700
+@@ -709,6 +709,14 @@
+ if (!dlm_grab(dlm))
+ return -EINVAL;
+
++ if (lr->dead_node != dlm->reco.dead_node) {
++ mlog(ML_ERROR, "%s: node %u sent dead_node=%u, but local "
++ "dead_node is %u\n", dlm->name, lr->node_idx,
++ lr->dead_node, dlm->reco.dead_node);
++ /* this is a hack */
++ dlm_put(dlm);
++ return -ENOMEM;
++ }
+ BUG_ON(lr->dead_node != dlm->reco.dead_node);
+
+ item = kcalloc(1, sizeof(*item), GFP_KERNEL);
+@@ -1502,7 +1510,7 @@
+ struct dlm_lock *newlock = NULL;
+ struct dlm_lockstatus *lksb = NULL;
+ int ret = 0;
+- int i;
++ int i, bad;
+ struct list_head *iter;
+ struct dlm_lock *lock = NULL;
+
+@@ -1612,9 +1620,33 @@
+ * relative to each other, but clearly *not*
+ * preserved relative to locks from other nodes.
+ */
++ bad = 0;
+ spin_lock(&res->spinlock);
+- dlm_lock_get(newlock);
+- list_add_tail(&newlock->list, queue);
++ list_for_each_entry(lock, queue, list) {
++ if (lock->ml.cookie == ml->cookie) {
++ u64 c = lock->ml.cookie;
++ mlog(ML_ERROR, "%s:%.*s: %u:%llu: lock already "
++ "exists on this lockres!\n", dlm->name,
++ res->lockname.len, res->lockname.name,
++ dlm_get_lock_cookie_node(c),
++ dlm_get_lock_cookie_seq(c));
++
++ mlog(ML_NOTICE, "sent lock: type=%d, conv=%d, "
++ "node=%u, cookie=%u:%llu, queue=%d\n",
++ ml->type, ml->convert_type, ml->node,
++ dlm_get_lock_cookie_node(ml->cookie),
++ dlm_get_lock_cookie_seq(ml->cookie),
++ ml->list);
++
++ __dlm_print_one_lock_resource(res);
++ bad = 1;
++ break;
++ }
++ }
++ if (!bad) {
++ dlm_lock_get(newlock);
++ list_add_tail(&newlock->list, queue);
++ }
+ spin_unlock(&res->spinlock);
+ }
+ mlog(0, "done running all the locks\n");
Added: branches/ocfs2-1.2-cert/patches/dlm-cleanup-reco-state-changes.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-cleanup-reco-state-changes.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-cleanup-reco-state-changes.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,85 @@
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:06:50.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:36:08.436692000 -0700
+@@ -115,12 +115,31 @@
+ return c;
+ }
+
++static inline void dlm_set_reco_dead_node(struct dlm_ctxt *dlm,
++ u8 dead_node)
++{
++ assert_spin_locked(&dlm->spinlock);
++ if (dlm->reco.dead_node != dead_node)
++ mlog(ML_NOTICE, "%s: changing dead_node from %u to %u\n",
++ dlm->name, dlm->reco.dead_node, dead_node);
++ dlm->reco.dead_node = dead_node;
++}
++
++static inline void dlm_set_reco_master(struct dlm_ctxt *dlm,
++ u8 master)
++{
++ assert_spin_locked(&dlm->spinlock);
++ mlog(ML_NOTICE, "%s: changing new_master from %u to %u\n",
++ dlm->name, dlm->reco.new_master, master);
++ dlm->reco.new_master = master;
++}
++
+ static inline void dlm_reset_recovery(struct dlm_ctxt *dlm)
+ {
+ spin_lock(&dlm->spinlock);
+ clear_bit(dlm->reco.dead_node, dlm->recovery_map);
+- dlm->reco.dead_node = O2NM_INVALID_NODE_NUM;
+- dlm->reco.new_master = O2NM_INVALID_NODE_NUM;
++ dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
++ dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
+ spin_unlock(&dlm->spinlock);
+ }
+
+@@ -341,7 +360,7 @@
+ mlog(0, "new master %u died while recovering %u!\n",
+ dlm->reco.new_master, dlm->reco.dead_node);
+ /* unset the new_master, leave dead_node */
+- dlm->reco.new_master = O2NM_INVALID_NODE_NUM;
++ dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
+ }
+
+ /* select a target to recover */
+@@ -350,14 +369,14 @@
+
+ bit = find_next_bit (dlm->recovery_map, O2NM_MAX_NODES+1, 0);
+ if (bit >= O2NM_MAX_NODES || bit < 0)
+- dlm->reco.dead_node = O2NM_INVALID_NODE_NUM;
++ dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
+ else
+- dlm->reco.dead_node = bit;
++ dlm_set_reco_dead_node(dlm, bit);
+ } else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) {
+ /* BUG? */
+ mlog(ML_ERROR, "dead_node %u no longer in recovery map!\n",
+ dlm->reco.dead_node);
+- dlm->reco.dead_node = O2NM_INVALID_NODE_NUM;
++ dlm_set_reco_dead_node(dlm, O2NM_INVALID_NODE_NUM);
+ }
+
+ if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
+@@ -2104,7 +2123,7 @@
+
+ /* set the new_master to this node */
+ spin_lock(&dlm->spinlock);
+- dlm->reco.new_master = dlm->node_num;
++ dlm_set_reco_master(dlm, dlm->node_num);
+ spin_unlock(&dlm->spinlock);
+ }
+
+@@ -2269,8 +2288,8 @@
+ "node %u changing it to %u\n", dlm->name,
+ dlm->reco.dead_node, br->node_idx, br->dead_node);
+ }
+- dlm->reco.new_master = br->node_idx;
+- dlm->reco.dead_node = br->dead_node;
++ dlm_set_reco_master(dlm, br->node_idx);
++ dlm_set_reco_dead_node(dlm, br->dead_node);
+ if (!test_bit(br->dead_node, dlm->recovery_map)) {
+ mlog(0, "recovery master %u sees %u as dead, but this "
+ "node has not yet. marking %u as dead\n",
Added: branches/ocfs2-1.2-cert/patches/dlm-detach-from-hb-events.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-detach-from-hb-events.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-detach-from-hb-events.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,20 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:28:33.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:41:49.174123000 -0700
+@@ -2665,6 +2665,7 @@
+ /* remove it from the list so that only one
+ * mle will be found */
+ list_del_init(&tmp->list);
++ __dlm_mle_detach_hb_events(dlm, mle);
+ }
+ spin_unlock(&tmp->spinlock);
+ }
+@@ -2758,6 +2759,7 @@
+
+ /* remove from the list early. NOTE: unlinking
+ * list_head while in list_for_each_safe */
++ __dlm_mle_detach_hb_events(dlm, mle);
+ spin_lock(&mle->spinlock);
+ list_del_init(&mle->list);
+ atomic_set(&mle->woken, 1);
Modified: branches/ocfs2-1.2-cert/patches/dlm-eloop.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-eloop.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-eloop.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- fs/ocfs2/dlm/dlmmaster.c.orig 2006-03-22 14:36:02.303204000 -0800
-+++ fs/ocfs2/dlm/dlmmaster.c 2006-03-23 18:44:36.290960000 -0800
-@@ -983,12 +983,14 @@ recheck:
+--- fs/ocfs2/dlm/dlmmaster.c.orig 2006-04-18 14:01:01.467762000 -0700
++++ fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:01:52.218442000 -0700
+@@ -983,12 +983,14 @@
spin_unlock(&res->spinlock);
/* this will cause the master to re-assert across
* the whole cluster, freeing up mles */
Added: branches/ocfs2-1.2-cert/patches/dlm-fix-dlm_is_node_dead.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-fix-dlm_is_node_dead.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-fix-dlm_is_node_dead.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,13 @@
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 16:06:38.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 16:46:33.052103000 -0700
+@@ -267,7 +267,7 @@
+ {
+ int dead;
+ spin_lock(&dlm->spinlock);
+- dead = test_bit(node, dlm->domain_map);
++ dead = !test_bit(node, dlm->domain_map);
+ spin_unlock(&dlm->spinlock);
+ return dead;
+ }
Added: branches/ocfs2-1.2-cert/patches/dlm-fix-lvb-empty-check.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-fix-lvb-empty-check.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-fix-lvb-empty-check.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,57 @@
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-17 16:06:38.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-17 17:06:50.062688000 -0700
+@@ -300,6 +300,15 @@
+ DLM_BLOCKED_LIST
+ };
+
++static inline int dlm_lvb_is_empty(char *lvb)
++{
++ int i;
++ for (i=0; i<DLM_LVB_LEN; i++)
++ if (lvb[i])
++ return 0;
++ return 1;
++}
++
+ static inline struct list_head *
+ dlm_list_idx_to_ptr(struct dlm_lock_resource *res, enum dlm_lockres_list idx)
+ {
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 16:46:33.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:06:50.380689000 -0700
+@@ -1022,8 +1022,9 @@
+ ml->type == LKM_PRMODE) {
+ /* if it is already set, this had better be a PR
+ * and it has to match */
+- if (mres->lvb[0] && (ml->type == LKM_EXMODE ||
+- memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) {
++ if (!dlm_lvb_is_empty(mres->lvb) &&
++ (ml->type == LKM_EXMODE ||
++ memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) {
+ mlog(ML_ERROR, "mismatched lvbs!\n");
+ __dlm_print_one_lock_resource(lock->lockres);
+ BUG();
+@@ -1553,7 +1554,7 @@
+ lksb->flags |= (ml->flags &
+ (DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB));
+
+- if (mres->lvb[0]) {
++ if (!dlm_lvb_is_empty(mres->lvb)) {
+ if (lksb->flags & DLM_LKSB_PUT_LVB) {
+ /* other node was trying to update
+ * lvb when node died. recreate the
+@@ -1564,8 +1565,9 @@
+ * most recent valid lvb info */
+ BUG_ON(ml->type != LKM_EXMODE &&
+ ml->type != LKM_PRMODE);
+- if (res->lvb[0] && (ml->type == LKM_EXMODE ||
+- memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
++ if (!dlm_lvb_is_empty(res->lvb) &&
++ (ml->type == LKM_EXMODE ||
++ memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
+ mlog(ML_ERROR, "received bad lvb!\n");
+ __dlm_print_one_lock_resource(res);
+ BUG();
Added: branches/ocfs2-1.2-cert/patches/dlm-fix-migration-asserts.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-fix-migration-asserts.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-fix-migration-asserts.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,28 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:47:15.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:49:09.809282000 -0700
+@@ -1706,6 +1706,23 @@
+ assert->node_idx);
+ }
+ }
++ if (mle->type == DLM_MLE_MIGRATION) {
++ if (flags & DLM_ASSERT_MASTER_MLE_CLEANUP) {
++ mlog(ML_NOTICE, "%s:%.*s: got cleanup assert"
++ " from %u for migration\n",
++ dlm->name, namelen, name,
++ assert->node_idx);
++ } else if (!(flags & DLM_ASSERT_MASTER_FINISH_MIGRATION)) {
++ mlog(ML_NOTICE, "%s:%.*s: got unrelated assert"
++ " from %u for migration, ignoring\n",
++ dlm->name, namelen, name,
++ assert->node_idx);
++ __dlm_put_mle(mle);
++ spin_unlock(&dlm->master_lock);
++ spin_unlock(&dlm->spinlock);
++ goto done;
++ }
++ }
+ }
+ spin_unlock(&dlm->master_lock);
+
Added: branches/ocfs2-1.2-cert/patches/dlm-fix-mle-refcount-while-inuse.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-fix-mle-refcount-while-inuse.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-fix-mle-refcount-while-inuse.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,198 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-17 18:04:34.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:28:33.258802000 -0700
+@@ -73,6 +73,7 @@
+ wait_queue_head_t wq;
+ atomic_t woken;
+ struct kref mle_refs;
++ int inuse;
+ unsigned long maybe_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
+ unsigned long vote_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
+ unsigned long response_map[BITS_TO_LONGS(O2NM_MAX_NODES)];
+@@ -334,6 +335,31 @@
+ spin_unlock(&dlm->spinlock);
+ }
+
++static void dlm_get_mle_inuse(struct dlm_master_list_entry *mle)
++{
++ struct dlm_ctxt *dlm;
++ dlm = mle->dlm;
++
++ assert_spin_locked(&dlm->spinlock);
++ assert_spin_locked(&dlm->master_lock);
++ mle->inuse++;
++ kref_get(&mle->mle_refs);
++}
++
++static void dlm_put_mle_inuse(struct dlm_master_list_entry *mle)
++{
++ struct dlm_ctxt *dlm;
++ dlm = mle->dlm;
++
++ spin_lock(&dlm->spinlock);
++ spin_lock(&dlm->master_lock);
++ mle->inuse--;
++ __dlm_put_mle(mle);
++ spin_unlock(&dlm->master_lock);
++ spin_unlock(&dlm->spinlock);
++
++}
++
+ /* remove from list and free */
+ static void __dlm_put_mle(struct dlm_master_list_entry *mle)
+ {
+@@ -387,6 +413,7 @@
+ memset(mle->response_map, 0, sizeof(mle->response_map));
+ mle->master = O2NM_MAX_NODES;
+ mle->new_master = O2NM_MAX_NODES;
++ mle->inuse = 0;
+
+ if (mle->type == DLM_MLE_MASTER) {
+ BUG_ON(!res);
+@@ -807,7 +834,7 @@
+ * if so, the creator of the BLOCK may try to put the last
+ * ref at this time in the assert master handler, so we
+ * need an extra one to keep from a bad ptr deref. */
+- dlm_get_mle(mle);
++ dlm_get_mle_inuse(mle);
+ spin_unlock(&dlm->master_lock);
+ spin_unlock(&dlm->spinlock);
+
+@@ -896,7 +923,7 @@
+ dlm_mle_detach_hb_events(dlm, mle);
+ dlm_put_mle(mle);
+ /* put the extra ref */
+- dlm_put_mle(mle);
++ dlm_put_mle_inuse(mle);
+
+ wake_waiters:
+ spin_lock(&res->spinlock);
+@@ -1748,6 +1775,7 @@
+ if (mle) {
+ int extra_ref = 0;
+ int nn = -1;
++ int rr, err = 0;
+
+ spin_lock(&mle->spinlock);
+ if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION)
+@@ -1767,27 +1795,64 @@
+ wake_up(&mle->wq);
+ spin_unlock(&mle->spinlock);
+
+- if (mle->type == DLM_MLE_MIGRATION && res) {
+- mlog(0, "finishing off migration of lockres %.*s, "
+- "from %u to %u\n",
+- res->lockname.len, res->lockname.name,
+- dlm->node_num, mle->new_master);
++ if (res) {
+ spin_lock(&res->spinlock);
+- res->state &= ~DLM_LOCK_RES_MIGRATING;
+- dlm_change_lockres_owner(dlm, res, mle->new_master);
+- BUG_ON(res->state & DLM_LOCK_RES_DIRTY);
++ if (mle->type == DLM_MLE_MIGRATION) {
++ mlog(0, "finishing off migration of lockres %.*s, "
++ "from %u to %u\n",
++ res->lockname.len, res->lockname.name,
++ dlm->node_num, mle->new_master);
++ res->state &= ~DLM_LOCK_RES_MIGRATING;
++ dlm_change_lockres_owner(dlm, res, mle->new_master);
++ BUG_ON(res->state & DLM_LOCK_RES_DIRTY);
++ } else {
++ dlm_change_lockres_owner(dlm, res, mle->master);
++ }
+ spin_unlock(&res->spinlock);
+ }
+- /* master is known, detach if not already detached */
+- dlm_mle_detach_hb_events(dlm, mle);
+- dlm_put_mle(mle);
+-
++
++ /* master is known, detach if not already detached.
++ * ensures that only one assert_master call will happen
++ * on this mle. */
++ spin_lock(&dlm->spinlock);
++ spin_lock(&dlm->master_lock);
++
++ rr = atomic_read(&mle->mle_refs.refcount);
++ if (mle->inuse > 0) {
++ if (extra_ref && rr < 3)
++ err = 1;
++ else if (!extra_ref && rr < 2)
++ err = 1;
++ } else {
++ if (extra_ref && rr < 2)
++ err = 1;
++ else if (!extra_ref && rr < 1)
++ err = 1;
++ }
++ if (err) {
++ mlog(ML_ERROR, "%s:%.*s: got assert master from %u "
++ "that will mess up this node, refs=%d, extra=%d, "
++ "inuse=%d\n", dlm->name, namelen, name,
++ assert->node_idx, rr, extra_ref, mle->inuse);
++ dlm_print_one_mle(mle);
++ }
++ list_del_init(&mle->list);
++ __dlm_mle_detach_hb_events(dlm, mle);
++ __dlm_put_mle(mle);
+ if (extra_ref) {
+ /* the assert master message now balances the extra
+ * ref given by the master / migration request message.
+ * if this is the last put, it will be removed
+ * from the list. */
+- dlm_put_mle(mle);
++ __dlm_put_mle(mle);
++ }
++ spin_unlock(&dlm->master_lock);
++ spin_unlock(&dlm->spinlock);
++ } else if (res) {
++ if (res->owner != assert->node_idx) {
++ mlog(0, "assert_master from %u, but current "
++ "owner is %u (%.*s), no mle\n", assert->node_idx,
++ res->owner, namelen, name);
+ }
+ }
+
+@@ -2133,7 +2198,7 @@
+ * take both dlm->spinlock and dlm->master_lock */
+ spin_lock(&dlm->spinlock);
+ spin_lock(&dlm->master_lock);
+- dlm_get_mle(mle);
++ dlm_get_mle_inuse(mle);
+ spin_unlock(&dlm->master_lock);
+ spin_unlock(&dlm->spinlock);
+
+@@ -2150,7 +2215,10 @@
+ /* migration failed, detach and clean up mle */
+ dlm_mle_detach_hb_events(dlm, mle);
+ dlm_put_mle(mle);
+- dlm_put_mle(mle);
++ dlm_put_mle_inuse(mle);
++ spin_lock(&res->spinlock);
++ res->state &= ~DLM_LOCK_RES_MIGRATING;
++ spin_unlock(&res->spinlock);
+ goto leave;
+ }
+
+@@ -2191,7 +2259,10 @@
+ /* migration failed, detach and clean up mle */
+ dlm_mle_detach_hb_events(dlm, mle);
+ dlm_put_mle(mle);
+- dlm_put_mle(mle);
++ dlm_put_mle_inuse(mle);
++ spin_lock(&res->spinlock);
++ res->state &= ~DLM_LOCK_RES_MIGRATING;
++ spin_unlock(&res->spinlock);
+ goto leave;
+ }
+ /* TODO: if node died: stop, clean up, return error */
+@@ -2207,7 +2278,7 @@
+
+ /* master is known, detach if not already detached */
+ dlm_mle_detach_hb_events(dlm, mle);
+- dlm_put_mle(mle);
++ dlm_put_mle_inuse(mle);
+ ret = 0;
+
+ dlm_lockres_calc_usage(dlm, res);
Modified: branches/ocfs2-1.2-cert/patches/dlm-fix_dlm_lock_reco_handling.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-fix_dlm_lock_reco_handling.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-fix_dlm_lock_reco_handling.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c
+Index: cert3/fs/ocfs2/dlm/dlmlock.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-07 14:21:05.466030000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c 2006-04-07 14:23:03.473034000 -0700
-@@ -299,7 +299,7 @@ static enum dlm_status dlm_send_remote_l
+--- cert3.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:20:13.728485000 -0700
++++ cert3/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:29:56.123081000 -0700
+@@ -299,7 +299,7 @@
if (tmpret >= 0) {
// successfully sent and received
ret = status; // this is already a dlm_status
@@ -11,7 +11,7 @@
mlog(ML_ERROR, "%s:%.*s: BUG. this is a stale lockres "
"no longer owned by %u. that node is coming back "
"up currently.\n", dlm->name, create.namelen,
-@@ -457,7 +457,7 @@ int dlm_create_lock_handler(struct o2net
+@@ -457,7 +457,7 @@
name = create->name;
namelen = create->namelen;
Added: branches/ocfs2-1.2-cert/patches/dlm-handle-reco-network-errors.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-handle-reco-network-errors.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-handle-reco-network-errors.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,102 @@
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:45:42.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:54:13.588703000 -0700
+@@ -756,6 +756,7 @@
+ struct list_head *iter;
+ int ret;
+ u8 dead_node, reco_master;
++ int skip_all_done = 0;
+
+ dlm = item->dlm;
+ dead_node = item->u.ral.dead_node;
+@@ -792,12 +793,18 @@
+ dlm_move_reco_locks_to_list(dlm, &resources, dead_node);
+
+ /* now we can begin blasting lockreses without the dlm lock */
++
++ /* any errors returned will be due to the new_master dying,
++ * the dlm_reco_thread should detect this */
+ list_for_each(iter, &resources) {
+ res = list_entry (iter, struct dlm_lock_resource, recovering);
+ ret = dlm_send_one_lockres(dlm, res, mres, reco_master,
+ DLM_MRES_RECOVERY);
+- if (ret < 0)
++ if (ret < 0) {
+ mlog_errno(ret);
++ skip_all_done = 1;
++ break;
++ }
+ }
+
+ /* move the resources back to the list */
+@@ -805,9 +812,12 @@
+ list_splice_init(&resources, &dlm->reco.resources);
+ spin_unlock(&dlm->spinlock);
+
+- ret = dlm_send_all_done_msg(dlm, dead_node, reco_master);
+- if (ret < 0)
+- mlog_errno(ret);
++ if (!skip_all_done) {
++ ret = dlm_send_all_done_msg(dlm, dead_node, reco_master);
++ if (ret < 0) {
++ mlog_errno(ret);
++ }
++ }
+
+ free_page((unsigned long)data);
+ }
+@@ -827,8 +837,14 @@
+
+ ret = o2net_send_message(DLM_RECO_DATA_DONE_MSG, dlm->key, &done_msg,
+ sizeof(done_msg), send_to, &tmpret);
+- /* negative status is ignored by the caller */
+- if (ret >= 0)
++ if (ret < 0) {
++ if (!dlm_is_host_down(ret)) {
++ mlog_errno(ret);
++ mlog(ML_ERROR, "%s: unknown error sending data-done "
++ "to %u\n", dlm->name, send_to);
++ BUG();
++ }
++ } else
+ ret = tmpret;
+ return ret;
+ }
+@@ -1110,22 +1126,25 @@
+ * we must send it immediately. */
+ ret = dlm_send_mig_lockres_msg(dlm, mres, send_to,
+ res, total_locks);
+- if (ret < 0) {
+- // TODO
+- mlog(ML_ERROR, "dlm_send_mig_lockres_msg "
+- "returned %d, TODO\n", ret);
+- BUG();
+- }
++ if (ret < 0)
++ goto error;
+ }
+ }
+ /* flush any remaining locks */
+ ret = dlm_send_mig_lockres_msg(dlm, mres, send_to, res, total_locks);
+- if (ret < 0) {
+- // TODO
+- mlog(ML_ERROR, "dlm_send_mig_lockres_msg returned %d, "
+- "TODO\n", ret);
++ if (ret < 0)
++ goto error;
++ return ret;
++
++error:
++ mlog(ML_ERROR, "%s: dlm_send_mig_lockres_msg returned %d\n",
++ dlm->name, ret);
++ if (!dlm_is_host_down(ret))
+ BUG();
+- }
++ mlog(ML_NOTICE, "%s: node %u went down while sending %s "
++ "lockres %.*s\n", dlm->name, send_to,
++ flags & DLM_MRES_RECOVERY ? "recovery" : "migration",
++ res->lockname.len, res->lockname.name);
+ return ret;
+ }
+
Added: branches/ocfs2-1.2-cert/patches/dlm-init-mle-when-used.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-init-mle-when-used.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-init-mle-when-used.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,21 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:44:57.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:47:15.129070000 -0700
+@@ -1509,15 +1509,12 @@
+ mlog_errno(-ENOMEM);
+ goto send_response;
+ }
+- spin_lock(&dlm->spinlock);
+- dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL,
+- name, namelen);
+- spin_unlock(&dlm->spinlock);
+ goto way_up_top;
+ }
+
+ // mlog(0, "this is second time thru, already allocated, "
+ // "add the block.\n");
++ dlm_init_mle(mle, DLM_MLE_BLOCK, dlm, NULL, name, namelen);
+ set_bit(request->node_idx, mle->maybe_map);
+ list_add(&mle->list, &dlm->master_list);
+ response = DLM_MASTER_RESP_NO;
Added: branches/ocfs2-1.2-cert/patches/dlm-mastery-debug-mlogs.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-mastery-debug-mlogs.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-mastery-debug-mlogs.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,83 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:51:10.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:58:02.717881000 -0700
+@@ -368,9 +368,13 @@
+
+ assert_spin_locked(&dlm->spinlock);
+ assert_spin_locked(&dlm->master_lock);
+- BUG_ON(!atomic_read(&mle->mle_refs.refcount));
+-
+- kref_put(&mle->mle_refs, dlm_mle_release);
++ if (!atomic_read(&mle->mle_refs.refcount)) {
++ /* this may or may not crash, but who cares.
++ * it's a BUG. */
++ mlog(ML_ERROR, "bad mle: %p\n", mle);
++ dlm_print_one_mle(mle);
++ } else
++ kref_put(&mle->mle_refs, dlm_mle_release);
+ }
+
+
+@@ -1006,6 +1010,12 @@
+ "rechecking now\n", dlm->name, res->lockname.len,
+ res->lockname.name);
+ goto recheck;
++ } else {
++ if (!voting_done) {
++ mlog(0, "map not changed and voting not done "
++ "for %s:%.*s\n", dlm->name, res->lockname.len,
++ res->lockname.name);
++ }
+ }
+
+ if (m != O2NM_MAX_NODES) {
+@@ -1687,7 +1697,7 @@
+ if (bit >= O2NM_MAX_NODES) {
+ /* not necessarily an error, though less likely.
+ * could be master just re-asserting. */
+- mlog(ML_ERROR, "no bits set in the maybe_map, but %u "
++ mlog(ML_NOTICE, "no bits set in the maybe_map, but %u "
+ "is asserting! (%.*s)\n", assert->node_idx,
+ namelen, name);
+ } else if (bit != assert->node_idx) {
+@@ -1699,7 +1709,7 @@
+ * number winning the mastery will respond
+ * YES to mastery requests, but this node
+ * had no way of knowing. let it pass. */
+- mlog(ML_ERROR, "%u is the lowest node, "
++ mlog(ML_NOTICE, "%u is the lowest node, "
+ "%u is asserting. (%.*s) %u must "
+ "have begun after %u won.\n", bit,
+ assert->node_idx, namelen, name, bit,
+@@ -1866,7 +1876,7 @@
+ spin_unlock(&dlm->spinlock);
+ } else if (res) {
+ if (res->owner != assert->node_idx) {
+- mlog(0, "assert_master from %u, but current "
++ mlog(ML_NOTICE, "assert_master from %u, but current "
+ "owner is %u (%.*s), no mle\n", assert->node_idx,
+ res->owner, namelen, name);
+ }
+@@ -2264,8 +2274,8 @@
+ /* avoid hang during shutdown when migrating lockres
+ * to a node which also goes down */
+ if (dlm_is_node_dead(dlm, target)) {
+- mlog(0, "%s:%.*s: expected migration target %u "
+- "is no longer up. restarting.\n",
++ mlog(ML_NOTICE, "%s:%.*s: expected migration "
++ "target %u is no longer up, restarting\n",
+ dlm->name, res->lockname.len,
+ res->lockname.name, target);
+ ret = -ERESTARTSYS;
+@@ -2782,8 +2792,8 @@
+ spin_unlock(&mle->spinlock);
+ wake_up(&mle->wq);
+
+- mlog(0, "node %u died during migration from "
+- "%u to %u!\n", dead_node,
++ mlog(ML_NOTICE, "%s: node %u died during migration from "
++ "%u to %u!\n", dlm->name, dead_node,
+ mle->master, mle->new_master);
+ /* if there is a lockres associated with this
+ * mle, find it and set its owner to UNKNOWN */
Added: branches/ocfs2-1.2-cert/patches/dlm-mle-debugging.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-mle-debugging.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-mle-debugging.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,66 @@
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-17 16:06:38.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-17 18:04:34.193499000 -0700
+@@ -123,15 +123,30 @@
+ return 1;
+ }
+
++#define dlm_print_nodemap(m) _dlm_print_nodemap(m,#m)
++void _dlm_print_nodemap(unsigned long *map, const char *mapname)
++{
++ int i;
++ printk("%s=[ ", mapname);
++ for (i=0; i<O2NM_MAX_NODES; i++)
++ if (test_bit(i, map))
++ printk("%d ", i);
++ printk("]");
++}
++
+ void dlm_print_one_mle(struct dlm_master_list_entry *mle)
+ {
+- int i = 0, refs;
++ int refs;
+ char *type;
+ char attached;
+ u8 master;
+ unsigned int namelen;
+ const char *name;
+ struct kref *k;
++ unsigned long *maybe = mle->maybe_map,
++ *vote = mle->vote_map,
++ *resp = mle->response_map,
++ *node = mle->node_map;
+
+ k = &mle->mle_refs;
+ if (mle->type == DLM_MLE_BLOCK)
+@@ -152,9 +167,18 @@
+ name = mle->u.res->lockname.name;
+ }
+
+- mlog(ML_NOTICE, " #%3d: %3s %3d %3u %3u %c (%d)%.*s\n",
+- i, type, refs, master, mle->new_master, attached,
+- namelen, namelen, name);
++ mlog(ML_NOTICE, "%.*s: %3s refs=%3d mas=%3u new=%3u evt=%c inuse=%d ",
++ namelen, name, type, refs, master, mle->new_master, attached,
++ mle->inuse);
++ dlm_print_nodemap(maybe);
++ printk(", ");
++ dlm_print_nodemap(vote);
++ printk(", ");
++ dlm_print_nodemap(resp);
++ printk(", ");
++ dlm_print_nodemap(node);
++ printk(", ");
++ printk("\n");
+ }
+
+
+@@ -166,7 +190,6 @@
+ struct list_head *iter;
+
+ mlog(ML_NOTICE, "dumping all mles for domain %s:\n", dlm->name);
+- mlog(ML_NOTICE, " ####: type refs owner new events? lockname nodemap votemap respmap maybemap\n");
+ spin_lock(&dlm->master_lock);
+ list_for_each(iter, &dlm->master_list) {
+ mle = list_entry(iter, struct dlm_master_list_entry, list);
Modified: branches/ocfs2-1.2-cert/patches/dlm-mlog_to_printk
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-mlog_to_printk 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-mlog_to_printk 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c
+Index: cert3/fs/ocfs2/dlm/dlmdomain.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdomain.c 2006-03-27 14:36:39.314361000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c 2006-03-31 18:14:08.706300000 -0800
+--- cert3.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-17 15:59:08.279630000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:16:29.145894000 -0700
@@ -381,12 +381,13 @@
assert_spin_locked(&dlm->spinlock);
@@ -36,10 +36,10 @@
__dlm_print_nodes(dlm);
/* notify anything attached to the heartbeat events */
-Index: ocfs2-1.2-cert/fs/ocfs2/super.c
+Index: cert3/fs/ocfs2/super.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/super.c 2006-03-27 14:36:41.121721000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/super.c 2006-03-31 18:14:08.718300000 -0800
+--- cert3.orig/fs/ocfs2/super.c 2006-04-17 15:59:08.283630000 -0700
++++ cert3/fs/ocfs2/super.c 2006-04-18 14:16:29.179894000 -0700
@@ -641,9 +641,8 @@
ocfs2_complete_mount_recovery(osb);
@@ -81,10 +81,10 @@
init_waitqueue_head(&osb->osb_wipe_event);
osb->osb_orphan_wipes = kcalloc(osb->max_slots,
-Index: ocfs2-1.2-cert/fs/ocfs2/slot_map.c
+Index: cert3/fs/ocfs2/slot_map.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/slot_map.c 2006-03-27 14:36:43.062080000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/slot_map.c 2006-03-31 18:14:08.724300000 -0800
+--- cert3.orig/fs/ocfs2/slot_map.c 2006-04-17 15:59:08.525628000 -0700
++++ cert3/fs/ocfs2/slot_map.c 2006-04-18 14:16:29.201894000 -0700
@@ -264,7 +264,7 @@
osb->slot_num = slot;
spin_unlock(&si->si_lock);
@@ -94,10 +94,10 @@
status = ocfs2_update_disk_slots(osb, si);
if (status < 0)
-Index: ocfs2-1.2-cert/fs/ocfs2/cluster/tcp.c
+Index: cert3/fs/ocfs2/cluster/tcp.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/cluster/tcp.c 2006-03-31 18:13:32.141028000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/cluster/tcp.c 2006-03-31 18:14:08.739300000 -0800
+--- cert3.orig/fs/ocfs2/cluster/tcp.c 2006-04-18 14:16:26.342811000 -0700
++++ cert3/fs/ocfs2/cluster/tcp.c 2006-04-18 14:16:29.229894000 -0700
@@ -397,8 +397,8 @@
}
Modified: branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-new_proc_entry 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/dlm/dlmdebug.c
+Index: cert3/fs/ocfs2/dlm/dlmdebug.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmdebug.c 2006-04-07 13:41:16.378842000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmdebug.c 2006-04-07 13:51:00.352280000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdebug.c 2006-04-18 14:20:13.681532000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdebug.c 2006-04-18 14:29:50.777972000 -0700
@@ -58,6 +58,9 @@
struct dlm_ctxt **dlm,
struct dlm_lock_resource **res);
@@ -74,10 +74,10 @@
/* lock resource printing is usually very important (printed
* right before a BUG in some cases), but we'd like to be
* able to shut it off if needed, hence the KERN_NOTICE level */
-Index: cert2/fs/ocfs2/dlm/dlmdebug.h
+Index: cert3/fs/ocfs2/dlm/dlmdebug.h
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmdebug.h 2006-04-07 13:41:16.455842000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmdebug.h 2006-04-07 13:51:00.358280000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdebug.h 2006-04-17 15:59:01.406875000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdebug.h 2006-04-18 14:29:50.798972000 -0700
@@ -28,5 +28,7 @@
void dlm_remove_proc(void);
void dlm_init_proc(void);
@@ -86,10 +86,10 @@
+void dlm_proc_del_domain(struct dlm_ctxt *dlm);
#endif
-Index: cert2/fs/ocfs2/dlm/dlmdomain.c
+Index: cert3/fs/ocfs2/dlm/dlmdomain.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-07 13:41:16.465840000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmdomain.c 2006-04-07 13:51:00.369280000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:20:20.405513000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:29:50.810973000 -0700
@@ -193,6 +193,8 @@
static void dlm_free_ctxt_mem(struct dlm_ctxt *dlm)
@@ -108,10 +108,10 @@
mlog(0, "context init: refcount %u\n",
atomic_read(&dlm->dlm_refs.refcount));
-Index: cert2/fs/ocfs2/dlm/dlmcommon.h
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-07 13:41:16.473842000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmcommon.h 2006-04-07 13:51:00.377280000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:20:20.392512000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:29:50.823972000 -0700
@@ -107,6 +107,8 @@
struct list_head master_list;
struct list_head mle_hb_events;
Added: branches/ocfs2-1.2-cert/patches/dlm-recheck-master-on-unlock.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-recheck-master-on-unlock.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-recheck-master-on-unlock.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,21 @@
+Index: cert3/fs/ocfs2/dlm/dlmunlock.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmunlock.c 2006-04-17 16:06:38.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmunlock.c 2006-04-17 16:45:10.836584000 -0700
+@@ -319,6 +319,16 @@
+
+ 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;
+ unlock.flags = cpu_to_be32(flags);
Added: branches/ocfs2-1.2-cert/patches/dlm-reco-debug-mlogs.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-reco-debug-mlogs.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-reco-debug-mlogs.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -0,0 +1,352 @@
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:54:13.000000000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:58:21.096120000 -0700
+@@ -239,6 +239,53 @@
+ *
+ */
+
++static void dlm_print_reco_junk(struct dlm_ctxt *dlm)
++{
++ struct dlm_reco_node_data *ndata;
++ struct dlm_lock_resource *res;
++
++ mlog(ML_NOTICE, "%s(%d): recovery info, state=%s, "
++ "dead=%u, master=%u\n", dlm->name,
++ dlm->dlm_reco_thread_task->pid,
++ dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive",
++ dlm->reco.dead_node, dlm->reco.new_master);
++
++ list_for_each_entry(ndata, &dlm->reco.node_data, list) {
++ char *st = "unknown";
++ switch (ndata->state) {
++ case DLM_RECO_NODE_DATA_INIT:
++ st = "init";
++ break;
++ case DLM_RECO_NODE_DATA_REQUESTING:
++ st = "requesting";
++ break;
++ case DLM_RECO_NODE_DATA_DEAD:
++ st = "dead";
++ break;
++ case DLM_RECO_NODE_DATA_RECEIVING:
++ st = "receiving";
++ break;
++ case DLM_RECO_NODE_DATA_REQUESTED:
++ st = "requested";
++ break;
++ case DLM_RECO_NODE_DATA_DONE:
++ st = "done";
++ break;
++ case DLM_RECO_NODE_DATA_FINALIZE_SENT:
++ st = "finalize-sent";
++ break;
++ default:
++ st = "bad";
++ break;
++ }
++ mlog(ML_NOTICE, "%s: reco state, node %u, state=%s\n",
++ dlm->name, ndata->node_num, st);
++ }
++ list_for_each_entry(res, &dlm->reco.resources, recovering) {
++ mlog(ML_NOTICE, "%s: lockres %.*s on recovering list\n",
++ dlm->name, res->lockname.len, res->lockname.name);
++ }
++}
+
+ #define DLM_RECO_THREAD_TIMEOUT_MS (5 * 1000)
+
+@@ -327,7 +374,28 @@
+
+ void dlm_wait_for_recovery(struct dlm_ctxt *dlm)
+ {
+- wait_event(dlm->reco.event, !dlm_in_recovery(dlm));
++ if (dlm_in_recovery(dlm)) {
++ mlog(ML_NOTICE, "%s: reco thread %d in recovery: "
++ "state=%d, master=%u, dead=%u\n",
++ dlm->name, dlm->dlm_reco_thread_task->pid,
++ dlm->reco.state, dlm->reco.new_master,
++ dlm->reco.dead_node);
++ dlm_print_reco_junk(dlm);
++ }
++
++ while (1) {
++ if (wait_event_timeout(dlm->reco.event,
++ !dlm_in_recovery(dlm),
++ msecs_to_jiffies(5000)))
++ break;
++ mlog(ML_NOTICE, "%s: reco thread %d still in recovery: "
++ "state=%d, master=%u, dead=%u\n",
++ dlm->name, dlm->dlm_reco_thread_task->pid,
++ dlm->reco.state, dlm->reco.new_master,
++ dlm->reco.dead_node);
++ dlm_print_reco_junk(dlm);
++ }
++ // wait_event(dlm->reco.event, !dlm_in_recovery(dlm));
+ }
+
+ static void dlm_begin_recovery(struct dlm_ctxt *dlm)
+@@ -385,7 +453,8 @@
+ /* return to main thread loop and sleep. */
+ return 0;
+ }
+- mlog(0, "recovery thread found node %u in the recovery map!\n",
++ mlog(ML_NOTICE, "%s(%d):recovery thread found node %u in the recovery map!\n",
++ dlm->name, dlm->dlm_reco_thread_task->pid,
+ dlm->reco.dead_node);
+ spin_unlock(&dlm->spinlock);
+
+@@ -408,8 +477,8 @@
+ }
+ mlog(0, "another node will master this recovery session.\n");
+ }
+- mlog(0, "dlm=%s, new_master=%u, this node=%u, dead_node=%u\n",
+- dlm->name, dlm->reco.new_master,
++ mlog(ML_NOTICE, "dlm=%s (%d), new_master=%u, this node=%u, dead_node=%u\n",
++ dlm->name, dlm->dlm_reco_thread_task->pid, dlm->reco.new_master,
+ dlm->node_num, dlm->reco.dead_node);
+
+ /* it is safe to start everything back up here
+@@ -421,7 +490,8 @@
+ return 0;
+
+ master_here:
+- mlog(0, "mastering recovery of %s:%u here(this=%u)!\n",
++ mlog(ML_NOTICE, "(%d) mastering recovery of %s:%u here(this=%u)!\n",
++ dlm->dlm_reco_thread_task->pid,
+ dlm->name, dlm->reco.dead_node, dlm->node_num);
+
+ status = dlm_remaster_locks(dlm, dlm->reco.dead_node);
+@@ -433,7 +503,7 @@
+ msleep(100);
+ } else {
+ /* success! see if any other nodes need recovery */
+- mlog(0, "DONE mastering recovery of %s:%u here(this=%u)!\n",
++ mlog(ML_NOTICE, "DONE mastering recovery of %s:%u here(this=%u)!\n",
+ dlm->name, dlm->reco.dead_node, dlm->node_num);
+ dlm_reset_recovery(dlm);
+ }
+@@ -563,11 +633,19 @@
+ goto leave;
+ case DLM_RECO_NODE_DATA_RECEIVING:
+ case DLM_RECO_NODE_DATA_REQUESTED:
++ mlog(0, "%s: node %u still in state %s\n",
++ dlm->name, ndata->node_num,
++ ndata->state==DLM_RECO_NODE_DATA_RECEIVING ?
++ "receiving" : "requested");
+ all_nodes_done = 0;
+ break;
+ case DLM_RECO_NODE_DATA_DONE:
++ mlog(0, "%s: node %u state is done\n",
++ dlm->name, ndata->node_num);
+ break;
+ case DLM_RECO_NODE_DATA_FINALIZE_SENT:
++ mlog(0, "%s: node %u state is finalize\n",
++ dlm->name, ndata->node_num);
+ break;
+ }
+ }
+@@ -592,7 +670,7 @@
+ spin_unlock(&dlm->spinlock);
+ mlog(0, "should be done with recovery!\n");
+
+- mlog(0, "finishing recovery of %s at %lu, "
++ mlog(ML_NOTICE, "finishing recovery of %s at %lu, "
+ "dead=%u, this=%u, new=%u\n", dlm->name,
+ jiffies, dlm->reco.dead_node,
+ dlm->node_num, dlm->reco.new_master);
+@@ -713,6 +791,7 @@
+ mlog(ML_ERROR, "%s: node %u sent dead_node=%u, but local "
+ "dead_node is %u\n", dlm->name, lr->node_idx,
+ lr->dead_node, dlm->reco.dead_node);
++ dlm_print_reco_junk(dlm);
+ /* this is a hack */
+ dlm_put(dlm);
+ return -ENOMEM;
+@@ -763,6 +842,9 @@
+ reco_master = item->u.ral.reco_master;
+ mres = (struct dlm_migratable_lockres *)data;
+
++ mlog(ML_NOTICE, "%s: recovery worker started, dead=%u, master=%u\n",
++ dlm->name, dead_node, reco_master);
++
+ if (dead_node != dlm->reco.dead_node ||
+ reco_master != dlm->reco.new_master) {
+ /* show extra debug info if the recovery state is messed */
+@@ -802,6 +884,9 @@
+ DLM_MRES_RECOVERY);
+ if (ret < 0) {
+ mlog_errno(ret);
++ mlog(ML_ERROR, "%s: node %u went down while sending "
++ "recovery state for dead node %u\n", dlm->name,
++ reco_master, dead_node);
+ skip_all_done = 1;
+ break;
+ }
+@@ -816,6 +901,9 @@
+ ret = dlm_send_all_done_msg(dlm, dead_node, reco_master);
+ if (ret < 0) {
+ mlog_errno(ret);
++ mlog(ML_ERROR, "%s: node %u went down while sending "
++ "recovery all-done for dead node %u\n", dlm->name,
++ reco_master, dead_node);
+ }
+ }
+
+@@ -831,7 +919,7 @@
+ memset(&done_msg, 0, sizeof(done_msg));
+ done_msg.node_idx = dlm->node_num;
+ done_msg.dead_node = dead_node;
+- mlog(0, "sending DATA DONE message to %u, "
++ mlog(ML_NOTICE, "sending DATA DONE message to %u, "
+ "my node=%u, dead node=%u\n", send_to, done_msg.node_idx,
+ done_msg.dead_node);
+
+@@ -864,6 +952,11 @@
+ mlog(0, "got DATA DONE: dead_node=%u, reco.dead_node=%u, "
+ "node_idx=%u, this node=%u\n", done->dead_node,
+ dlm->reco.dead_node, done->node_idx, dlm->node_num);
++ if (done->dead_node != dlm->reco.dead_node) {
++ mlog(ML_ERROR, "got DATA DONE: dead_node=%u, reco.dead_node=%u, "
++ "node_idx=%u, this node=%u\n", done->dead_node,
++ dlm->reco.dead_node, done->node_idx, dlm->node_num);
++ }
+ BUG_ON(done->dead_node != dlm->reco.dead_node);
+
+ spin_lock(&dlm_reco_state_lock);
+@@ -2120,7 +2213,7 @@
+ struct dlm_lockstatus lksb;
+ int status = -EINVAL;
+
+- mlog(0, "starting recovery of %s at %lu, dead=%u, this=%u\n",
++ mlog(ML_NOTICE, "starting recovery of %s at %lu, dead=%u, this=%u\n",
+ dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num);
+ again:
+ memset(&lksb, 0, sizeof(lksb));
+@@ -2128,17 +2221,17 @@
+ ret = dlmlock(dlm, LKM_EXMODE, &lksb, LKM_NOQUEUE|LKM_RECOVERY,
+ DLM_RECOVERY_LOCK_NAME, dlm_reco_ast, dlm, dlm_reco_bast);
+
+- mlog(0, "%s: dlmlock($RECOVERY) returned %d, lksb=%d\n",
++ mlog(ML_NOTICE, "%s: dlmlock($RECOVERY) returned %d, lksb=%d\n",
+ dlm->name, ret, lksb.status);
+
+ if (ret == DLM_NORMAL) {
+- mlog(0, "dlm=%s dlmlock says I got it (this=%u)\n",
++ mlog(ML_NOTICE, "dlm=%s dlmlock says I got it (this=%u)\n",
+ dlm->name, dlm->node_num);
+
+ /* got the EX lock. check to see if another node
+ * just became the reco master */
+ if (dlm_reco_master_ready(dlm)) {
+- mlog(0, "%s: got reco EX lock, but %u will "
++ mlog(ML_NOTICE, "%s: got reco EX lock, but %u will "
+ "do the recovery\n", dlm->name,
+ dlm->reco.new_master);
+ status = -EEXIST;
+@@ -2149,7 +2242,7 @@
+ spin_lock(&dlm->spinlock);
+ if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) {
+ status = -EINVAL;
+- mlog(0, "%s: got reco EX lock, but "
++ mlog(ML_NOTICE, "%s: got reco EX lock, but "
+ "node got recovered already\n", dlm->name);
+ if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) {
+ mlog(ML_ERROR, "%s: new master is %u "
+@@ -2164,7 +2257,7 @@
+ /* if this node has actually become the recovery master,
+ * set the master and send the messages to begin recovery */
+ if (!status) {
+- mlog(0, "%s: dead=%u, this=%u, sending "
++ mlog(ML_NOTICE, "%s: dead=%u, this=%u, sending "
+ "begin_reco now\n", dlm->name,
+ dlm->reco.dead_node, dlm->node_num);
+ status = dlm_send_begin_reco_message(dlm,
+@@ -2195,7 +2288,7 @@
+ mlog(ML_ERROR, "dlmunlock returned %d\n", ret);
+ }
+ } else if (ret == DLM_NOTQUEUED) {
+- mlog(0, "dlm=%s dlmlock says another node got it (this=%u)\n",
++ mlog(ML_NOTICE, "dlm=%s dlmlock says another node got it (this=%u)\n",
+ dlm->name, dlm->node_num);
+ /* another node is master. wait on
+ * reco.new_master != O2NM_INVALID_NODE_NUM
+@@ -2204,12 +2297,12 @@
+ dlm_reco_master_ready(dlm),
+ msecs_to_jiffies(1000));
+ if (!dlm_reco_master_ready(dlm)) {
+- mlog(0, "%s: reco master taking awhile\n",
++ mlog(ML_NOTICE, "%s: reco master taking awhile\n",
+ dlm->name);
+ goto again;
+ }
+ /* another node has informed this one that it is reco master */
+- mlog(0, "%s: reco master %u is ready to recover %u\n",
++ 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 {
+@@ -2243,7 +2336,7 @@
+
+ mlog_entry("%u\n", dead_node);
+
+- mlog(0, "dead node is %u\n", dead_node);
++ mlog(ML_NOTICE, "%s: dead node is %u\n", dlm->name, dead_node);
+
+ spin_lock(&dlm->spinlock);
+ dlm_node_iter_init(dlm->domain_map, &iter);
+@@ -2316,8 +2409,9 @@
+ if (!dlm_grab(dlm))
+ return 0;
+
+- mlog(0, "node %u wants to recover node %u\n",
+- br->node_idx, br->dead_node);
++ mlog(ML_NOTICE, "%s: node %u wants to recover node %u (%u:%u)\n",
++ dlm->name, br->node_idx, br->dead_node,
++ dlm->reco.dead_node, dlm->reco.new_master);
+
+ dlm_fire_domain_eviction_callbacks(dlm, br->dead_node);
+
+@@ -2359,6 +2453,11 @@
+ spin_unlock(&dlm->spinlock);
+
+ dlm_kick_recovery_thread(dlm);
++
++ mlog(ML_NOTICE, "%s: recovery started by node %u, for %u (%u:%u)\n",
++ dlm->name, br->node_idx, br->dead_node,
++ dlm->reco.dead_node, dlm->reco.new_master);
++
+ dlm_put(dlm);
+ return 0;
+ }
+@@ -2371,7 +2470,7 @@
+ int nodenum;
+ int status;
+
+- mlog(0, "finishing recovery for node %s:%u\n",
++ mlog(ML_NOTICE, "finishing recovery for node %s:%u\n",
+ dlm->name, dlm->reco.dead_node);
+
+ spin_lock(&dlm->spinlock);
+@@ -2416,8 +2515,9 @@
+ if (!dlm_grab(dlm))
+ return 0;
+
+- mlog(0, "node %u finalizing recovery of node %u\n",
+- fr->node_idx, fr->dead_node);
++ mlog(ML_NOTICE, "%s: node %u finalizing recovery of node %u (%u:%u)\n",
++ dlm->name, fr->node_idx, fr->dead_node,
++ dlm->reco.dead_node, dlm->reco.new_master);
+
+ spin_lock(&dlm->spinlock);
+
+@@ -2441,6 +2541,9 @@
+ dlm_reset_recovery(dlm);
+
+ dlm_kick_recovery_thread(dlm);
++ mlog(ML_NOTICE, "%s: recovery done, reco master was %u, dead now %u, master now %u\n",
++ dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master);
++
+ dlm_put(dlm);
+ return 0;
+ }
Modified: branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-03 15:25:33.033442000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c 2006-04-03 15:26:50.098725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:19:59.501211000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:20:13.647566000 -0700
@@ -768,7 +768,7 @@
}
BUG_ON(num == dead_node);
@@ -39,10 +39,10 @@
if (!buf || !item)
goto leave;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c
+Index: cert3/fs/ocfs2/dlm/dlmdebug.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdebug.c 2006-03-27 14:36:39.586328000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c 2006-04-03 15:26:50.106725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdebug.c 2006-04-17 15:59:05.073714000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdebug.c 2006-04-18 14:20:13.681532000 -0700
@@ -177,7 +177,7 @@
mlog(ML_ERROR, "user passed too little data: %d bytes\n", len);
goto leave;
@@ -61,10 +61,10 @@
if (!buf) {
mlog(ML_ERROR, "could not alloc %d bytes\n", len+1);
ret = -ENOMEM;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c
+Index: cert3/fs/ocfs2/dlm/dlmdomain.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-03 15:25:32.155764000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c 2006-04-03 15:26:50.143726000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:16:29.145894000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:20:13.696518000 -0700
@@ -892,7 +892,7 @@
mlog_entry("%p", dlm);
@@ -99,10 +99,10 @@
if (!dlm->lockres_hash) {
mlog_errno(-ENOMEM);
kfree(dlm->name);
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmfs.c
+Index: cert3/fs/ocfs2/dlm/dlmfs.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmfs.c 2006-03-27 14:36:39.384360000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmfs.c 2006-04-03 15:26:50.151725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmfs.c 2006-04-17 15:59:05.318591000 -0700
++++ cert3/fs/ocfs2/dlm/dlmfs.c 2006-04-18 14:20:13.720493000 -0700
@@ -116,7 +116,7 @@
* doesn't make sense for LVB writes. */
file->f_flags &= ~O_APPEND;
@@ -130,10 +130,10 @@
if (!lvb_buf)
return -ENOMEM;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c
+Index: cert3/fs/ocfs2/dlm/dlmlock.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-03 15:25:31.354084000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c 2006-04-03 15:26:50.160725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:19.222114000 -0700
++++ cert3/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:20:13.728485000 -0700
@@ -408,13 +408,13 @@
struct dlm_lock *lock;
int kernel_allocated = 0;
@@ -150,10 +150,10 @@
if (!lksb) {
kfree(lock);
return NULL;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-03 15:25:33.006442000 -0700
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c 2006-04-03 15:26:50.182725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:19:59.480232000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:20:13.757456000 -0700
@@ -699,11 +699,11 @@
{
struct dlm_lock_resource *res;
@@ -221,10 +221,10 @@
if (!mle) {
ret = -ENOMEM;
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/userdlm.c
+Index: cert3/fs/ocfs2/dlm/userdlm.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/userdlm.c 2006-03-31 14:11:14.075366000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/userdlm.c 2006-04-03 15:26:50.191725000 -0700
+--- cert3.orig/fs/ocfs2/dlm/userdlm.c 2006-04-17 15:59:05.434590000 -0700
++++ cert3/fs/ocfs2/dlm/userdlm.c 2006-04-18 14:20:13.780444000 -0700
@@ -672,7 +672,7 @@
u32 dlm_key;
char *domain;
Modified: branches/ocfs2-1.2-cert/patches/fix-death-during-recovery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-death-during-recovery.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-death-during-recovery.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-03-30 15:03:04.926952000 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c 2006-03-30 15:03:17.008100000 -0800
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:19.243114000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:23.775504000 -0700
@@ -503,6 +503,7 @@
status = dlm_remaster_locks(dlm, dlm->reco.dead_node);
Modified: branches/ocfs2-1.2-cert/patches/fix-dlmlock_remote.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-dlmlock_remote.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-dlmlock_remote.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2/fs/ocfs2/dlm/dlmlock.c
+Index: cert3/fs/ocfs2/dlm/dlmlock.c
===================================================================
---- ocfs2-orig/fs/ocfs2/dlm/dlmlock.c (revision 2785)
-+++ ocfs2/fs/ocfs2/dlm/dlmlock.c (working copy)
-@@ -200,6 +200,7 @@ static enum dlm_status dlmlock_remote(st
+--- cert3.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:11:45.202243000 -0700
++++ cert3/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:07.615656000 -0700
+@@ -200,6 +200,7 @@
struct dlm_lock *lock, int flags)
{
enum dlm_status status = DLM_DENIED;
@@ -10,7 +10,7 @@
mlog_entry("type=%d\n", lock->ml.type);
mlog(0, "lockres %.*s, flags = 0x%x\n", res->lockname.len,
-@@ -229,6 +230,10 @@ static enum dlm_status dlmlock_remote(st
+@@ -229,6 +230,10 @@
dlm_error(status);
dlm_revert_pending_lock(res, lock);
dlm_lock_put(lock);
@@ -21,7 +21,7 @@
} else if (dlm_is_recovery_lock(res->lockname.name,
res->lockname.len)) {
/* special case for the $RECOVERY lock.
-@@ -243,7 +248,8 @@ static enum dlm_status dlmlock_remote(st
+@@ -243,7 +248,8 @@
}
spin_unlock(&res->spinlock);
Modified: branches/ocfs2-1.2-cert/patches/fix-purge-lockres.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-purge-lockres.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-purge-lockres.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmthread.c
===================================================================
---- fs/ocfs2/dlm/dlmthread.c.orig 2006-03-22 14:36:02.385122000 -0800
-+++ fs/ocfs2/dlm/dlmthread.c 2006-03-22 23:50:11.592040000 -0800
-@@ -57,6 +57,8 @@ extern spinlock_t dlm_domain_lock;
+--- fs/ocfs2/dlm/dlmthread.c.orig 2006-04-18 14:01:04.191802000 -0700
++++ fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:01:49.656402000 -0700
+@@ -57,6 +57,8 @@
extern struct list_head dlm_domains;
static int dlm_thread(void *data);
@@ -11,7 +11,7 @@
#define dlm_lock_is_remote(dlm, lock) ((lock)->ml.node != (dlm)->node_num)
-@@ -112,10 +114,23 @@ void __dlm_lockres_calc_usage(struct dlm
+@@ -112,10 +114,23 @@
res->last_used = jiffies;
list_add_tail(&res->purge, &dlm->purge_list);
dlm->purge_count++;
@@ -37,7 +37,7 @@
list_del_init(&res->purge);
dlm->purge_count--;
-@@ -181,6 +196,24 @@ finish:
+@@ -181,6 +196,24 @@
__dlm_unhash_lockres(lockres);
}
Modified: branches/ocfs2-1.2-cert/patches/fix-recovery-spin.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-recovery-spin.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-recovery-spin.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmmaster.c 2006-03-27 14:44:59.603059672 -0800
-+++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c 2006-03-27 14:44:59.667049944 -0800
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:12:26.794818000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:16:04.697622000 -0700
@@ -875,7 +875,7 @@
}
Modified: 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-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-remote-lock-during-reco.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c
+Index: cert3/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
+--- cert3.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:13.380950000 -0700
++++ cert3/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:19.222114000 -0700
@@ -226,7 +226,16 @@
res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
lock->lock_pending = 0;
@@ -52,11 +52,11 @@
}
if (status != DLM_NORMAL) {
-Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/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 @@
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:05:57.383042000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:19.243114000 -0700
+@@ -2426,6 +2426,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;
Modified: branches/ocfs2-1.2-cert/patches/fix-wait-in-mastery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/fix-wait-in-mastery.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/fix-wait-in-mastery.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/dlm/dlmcommon.h
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-02 10:27:13.093235000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmcommon.h 2006-04-02 10:34:13.041599000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:16:01.253910000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:19:59.460252000 -0700
@@ -700,6 +700,7 @@
void dlm_kick_recovery_thread(struct dlm_ctxt *dlm);
int dlm_is_node_dead(struct dlm_ctxt *dlm, u8 node);
@@ -10,10 +10,10 @@
void dlm_get(struct dlm_ctxt *dlm);
void dlm_put(struct dlm_ctxt *dlm);
-Index: cert2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-02 10:27:13.347098000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmmaster.c 2006-04-02 10:35:49.792463000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:16:16.525841000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:19:59.480232000 -0700
@@ -888,6 +888,9 @@
} else
wait_on_recovery = 0;
@@ -24,10 +24,10 @@
}
/* must wait for lock to be mastered elsewhere */
-Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-02 10:27:13.718098000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c 2006-04-02 10:34:18.857673000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:34.956962000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:19:59.501211000 -0700
@@ -344,6 +344,18 @@
return dead;
}
Modified: branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes
===================================================================
--- branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/hb-add_tracking_around_configured_nodes 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/cluster/heartbeat.c
+Index: cert3/fs/ocfs2/cluster/heartbeat.c
===================================================================
---- cert2.orig/fs/ocfs2/cluster/heartbeat.c 2006-04-07 13:41:22.896920000 -0700
-+++ cert2/fs/ocfs2/cluster/heartbeat.c 2006-04-07 13:50:48.227120000 -0700
+--- cert3.orig/fs/ocfs2/cluster/heartbeat.c 2006-04-18 14:16:10.289006000 -0700
++++ cert3/fs/ocfs2/cluster/heartbeat.c 2006-04-18 14:20:24.580099000 -0700
@@ -931,12 +931,14 @@
struct o2hb_bio_wait_ctxt write_wc;
struct timeval start;
Modified: branches/ocfs2-1.2-cert/patches/hold-dirty-ref.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/hold-dirty-ref.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/hold-dirty-ref.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,6 +1,7 @@
-diff -ur --exclude '*.o' --exclude '*.ko' --exclude '*.mod.c' --exclude 'stamp*' --exclude .svn ocfs2-1.2-cert/fs/ocfs2/dlm/dlmcommon.h ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
---- ocfs2-1.2-cert/fs/ocfs2/dlm/dlmcommon.h 2006-03-27 15:18:00.081080000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h 2006-03-27 15:15:10.305299000 -0800
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:01:07.715809000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:16:01.253910000 -0700
@@ -219,18 +219,26 @@
struct hlist_node hash_node;
struct kref refs;
@@ -31,9 +32,10 @@
unsigned long last_used;
unsigned migration_pending:1;
-diff -ur --exclude '*.o' --exclude '*.ko' --exclude '*.mod.c' --exclude 'stamp*' --exclude .svn ocfs2-1.2-cert/fs/ocfs2/dlm/dlmthread.c ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c
---- ocfs2-1.2-cert/fs/ocfs2/dlm/dlmthread.c 2006-03-27 15:18:00.162080000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c 2006-03-27 15:10:06.086591000 -0800
+Index: cert3/fs/ocfs2/dlm/dlmthread.c
+===================================================================
+--- cert3.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:01:49.656402000 -0700
++++ cert3/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:16:01.262910000 -0700
@@ -466,6 +466,8 @@
/* don't shuffle secondary queues */
if ((res->owner == dlm->node_num) &&
Modified: branches/ocfs2-1.2-cert/patches/hold-recovery-ref.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/hold-recovery-ref.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/hold-recovery-ref.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-03-21 19:30:46.726473000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmrecovery.c 2006-03-22 13:20:39.267067000 -0800
-@@ -1783,8 +1783,14 @@ void dlm_move_lockres_to_recovery_list(s
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-17 17:58:21.096120000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:01:04.152803000 -0700
+@@ -1782,8 +1782,14 @@
struct dlm_lock *lock;
res->state |= DLM_LOCK_RES_RECOVERING;
@@ -18,7 +18,7 @@
list_add_tail(&res->recovering, &dlm->reco.resources);
/* find any pending locks and put them back on proper list */
-@@ -1873,9 +1879,11 @@ static void dlm_finish_local_lockres_rec
+@@ -1872,9 +1878,11 @@
spin_lock(&res->spinlock);
dlm_change_lockres_owner(dlm, res, new_master);
res->state &= ~DLM_LOCK_RES_RECOVERING;
@@ -31,7 +31,7 @@
}
}
-@@ -1908,11 +1916,13 @@ static void dlm_finish_local_lockres_rec
+@@ -1907,11 +1915,13 @@
dlm->name, res->lockname.len,
res->lockname.name, res->owner);
list_del_init(&res->recovering);
@@ -46,11 +46,11 @@
spin_unlock(&res->spinlock);
wake_up(&res->wq);
}
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmcommon.h 2006-03-21 19:30:46.711489000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmcommon.h 2006-03-22 11:59:46.979544000 -0800
-@@ -858,6 +858,7 @@ int dlm_lock_basts_flushed(struct dlm_ct
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-17 17:06:50.062688000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:01:04.173802000 -0700
+@@ -858,6 +858,7 @@
int dlm_dump_all_mles(const char __user *data, unsigned int len);
@@ -58,11 +58,11 @@
static inline const char * dlm_lock_mode_name(int mode)
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c
+Index: cert3/fs/ocfs2/dlm/dlmthread.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmthread.c 2006-03-22 11:58:41.192580000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c 2006-03-22 11:59:07.989988000 -0800
-@@ -82,7 +82,7 @@ repeat:
+--- cert3.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-17 16:23:51.218905000 -0700
++++ cert3/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:01:04.191802000 -0700
+@@ -82,7 +82,7 @@
}
Modified: branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs
===================================================================
--- branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/jrnl-change_gfp_kernel_to_nofs 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/extent_map.c
+Index: cert3/fs/ocfs2/extent_map.c
===================================================================
---- cert2.orig/fs/ocfs2/extent_map.c 2006-04-07 13:41:20.182692000 -0700
-+++ cert2/fs/ocfs2/extent_map.c 2006-04-07 13:50:54.072200000 -0700
+--- cert3.orig/fs/ocfs2/extent_map.c 2006-04-17 16:06:30.898745000 -0700
++++ cert3/fs/ocfs2/extent_map.c 2006-04-18 14:25:25.816145000 -0700
@@ -581,7 +581,7 @@
ret = -ENOMEM;
@@ -28,10 +28,10 @@
if (!ctxt.right_ent)
break;
}
-Index: cert2/fs/ocfs2/journal.c
+Index: cert3/fs/ocfs2/journal.c
===================================================================
---- cert2.orig/fs/ocfs2/journal.c 2006-04-07 13:41:20.387561000 -0700
-+++ cert2/fs/ocfs2/journal.c 2006-04-07 13:50:54.085200000 -0700
+--- cert3.orig/fs/ocfs2/journal.c 2006-04-18 14:00:53.905090000 -0700
++++ cert3/fs/ocfs2/journal.c 2006-04-18 14:25:25.829132000 -0700
@@ -117,7 +117,7 @@
{
struct ocfs2_journal_handle *retval = NULL;
@@ -50,10 +50,10 @@
if (!item) {
/* Though we wish to avoid it, we are in fact safe in
* skipping local alloc cleanup as fsck.ocfs2 is more
-Index: cert2/fs/ocfs2/cluster/nodemanager.c
+Index: cert3/fs/ocfs2/cluster/nodemanager.c
===================================================================
---- cert2.orig/fs/ocfs2/cluster/nodemanager.c 2006-04-07 13:41:20.458561000 -0700
-+++ cert2/fs/ocfs2/cluster/nodemanager.c 2006-04-07 13:50:54.096200000 -0700
+--- cert3.orig/fs/ocfs2/cluster/nodemanager.c 2006-04-17 15:59:02.613554000 -0700
++++ cert3/fs/ocfs2/cluster/nodemanager.c 2006-04-18 14:25:25.867094000 -0700
@@ -550,7 +550,7 @@
if (strlen(name) > O2NM_MAX_NAME_LEN)
goto out; /* ENAMETOOLONG */
@@ -76,10 +76,10 @@
o2hb_group = o2hb_alloc_hb_set();
if (cluster == NULL || ns == NULL || o2hb_group == NULL || defs == NULL)
goto out;
-Index: cert2/fs/ocfs2/cluster/heartbeat.c
+Index: cert3/fs/ocfs2/cluster/heartbeat.c
===================================================================
---- cert2.orig/fs/ocfs2/cluster/heartbeat.c 2006-04-07 13:50:48.227120000 -0700
-+++ cert2/fs/ocfs2/cluster/heartbeat.c 2006-04-07 13:50:54.109201000 -0700
+--- cert3.orig/fs/ocfs2/cluster/heartbeat.c 2006-04-18 14:20:24.580099000 -0700
++++ cert3/fs/ocfs2/cluster/heartbeat.c 2006-04-18 14:25:25.890071000 -0700
@@ -481,7 +481,7 @@
o2hb_compute_request_limits(reg, max_slots, &num_bios, &slots_per_bio);
@@ -141,10 +141,10 @@
if (hs == NULL)
goto out;
-Index: cert2/fs/ocfs2/cluster/net_proc.c
+Index: cert3/fs/ocfs2/cluster/net_proc.c
===================================================================
---- cert2.orig/fs/ocfs2/cluster/net_proc.c 2006-04-07 13:41:20.603560000 -0700
-+++ cert2/fs/ocfs2/cluster/net_proc.c 2006-04-07 13:50:54.117200000 -0700
+--- cert3.orig/fs/ocfs2/cluster/net_proc.c 2006-04-18 14:16:26.301852000 -0700
++++ cert3/fs/ocfs2/cluster/net_proc.c 2006-04-18 14:25:25.903058000 -0700
@@ -156,7 +156,7 @@
struct seq_file *seq;
int ret;
@@ -163,10 +163,10 @@
if (dummy_sc == NULL) {
ret = -ENOMEM;
goto out;
-Index: cert2/fs/ocfs2/vote.c
+Index: cert3/fs/ocfs2/vote.c
===================================================================
---- cert2.orig/fs/ocfs2/vote.c 2006-04-07 13:41:20.674561000 -0700
-+++ cert2/fs/ocfs2/vote.c 2006-04-07 13:50:54.126200000 -0700
+--- cert3.orig/fs/ocfs2/vote.c 2006-04-17 15:59:02.631554000 -0700
++++ cert3/fs/ocfs2/vote.c 2006-04-18 14:25:25.930031000 -0700
@@ -598,7 +598,7 @@
{
struct ocfs2_net_wait_ctxt *w;
Modified: branches/ocfs2-1.2-cert/patches/lockres-release-info.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/lockres-release-info.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/lockres-release-info.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-03-20 17:08:31.633920000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c 2006-03-21 13:09:51.785260000 -0800
-@@ -613,6 +613,20 @@ static void dlm_lockres_release(struct k
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 13:58:02.717881000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:00:58.839560000 -0700
+@@ -613,6 +613,20 @@
mlog(0, "destroying lockres %.*s\n", res->lockname.len,
res->lockname.name);
Modified: branches/ocfs2-1.2-cert/patches/lvb-recovery-fix.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/lvb-recovery-fix.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/lvb-recovery-fix.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- fs/ocfs2/dlm/dlmrecovery.c.orig 2006-03-22 14:36:11.772185000 -0800
-+++ fs/ocfs2/dlm/dlmrecovery.c 2006-03-23 18:31:54.877480000 -0800
-@@ -1606,6 +1606,66 @@ dlm_list_num_to_pointer(struct dlm_lock_
+--- fs/ocfs2/dlm/dlmrecovery.c.orig 2006-04-18 14:01:36.000000000 -0700
++++ fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:05:57.383042000 -0700
+@@ -1605,6 +1605,66 @@
* TODO: do MIGRATING and RECOVERING spinning
*/
@@ -34,8 +34,8 @@
+ u64 isize, atime, mtime, ctime;
+ /* just do some lame decoding, doesn't need to be too
+ * accurate, just cut the encoded value into smaller values */
-+
-+
++
++
+ oldseq = be32_to_cpu(raw->lvb_old_seq);
+ vers = be32_to_cpu(raw->lvb_version);
+ clusters= be32_to_cpu(raw->lvb_iclusters);
@@ -61,7 +61,7 @@
+ for (i=0; i<DLM_LVB_LEN; i++)
+ printk("%02x", (unsigned char)lvb[i]);
+#endif
-+
++
+ dlm_print_ocfs2_lvb(lvb);
+}
+
@@ -69,7 +69,7 @@
/*
* NOTE about in-flight requests during migration:
*
-@@ -1708,13 +1768,21 @@ static int dlm_process_recovery_data(str
+@@ -1707,40 +1767,50 @@
}
lksb->flags |= (ml->flags &
(DLM_LKSB_PUT_LVB|DLM_LKSB_GET_LVB));
@@ -92,35 +92,44 @@
} else {
/* otherwise, the node is sending its
* most recent valid lvb info */
-@@ -1723,17 +1791,19 @@ static int dlm_process_recovery_data(str
- if (!dlm_lvb_is_empty(res->lvb) &&
- (ml->type == LKM_EXMODE ||
- memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
+ BUG_ON(ml->type != LKM_EXMODE &&
+ ml->type != LKM_PRMODE);
+ if (!dlm_lvb_is_empty(res->lvb) &&
+- (ml->type == LKM_EXMODE ||
+- memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
- int i;
-+ u64 c = be64_to_cpu(lock->ml.cookie);
- mlog(ML_ERROR, "%s:%.*s: received bad "
+- mlog(ML_ERROR, "%s:%.*s: received bad "
- "lvb! type=%d\n", dlm->name,
-- res->lockname.len,
+- res->lockname.len,
- res->lockname.name, ml->type);
-+ "lvb! type=%d, convtype=%d, "
-+ "node=%u, cookie=%u:%llu\n",
-+ dlm->name, res->lockname.len,
-+ res->lockname.name, ml->type,
-+ ml->convert_type, ml->node,
-+ dlm_get_lock_cookie_node(c),
-+ dlm_get_lock_cookie_seq(c));
- printk("lockres lvb=[");
+- printk("lockres lvb=[");
- for (i=0; i<DLM_LVB_LEN; i++)
- printk("%02x", res->lvb[i]);
-+ dlm_print_lvb(res->lvb);
- printk("]\nmigrated lvb=[");
+- printk("]\nmigrated lvb=[");
- for (i=0; i<DLM_LVB_LEN; i++)
- printk("%02x", mres->lvb[i]);
-+ dlm_print_lvb(mres->lvb);
- printk("]\n");
- dlm_print_one_lock_resource(res);
- BUG();
-@@ -1741,7 +1811,7 @@ static int dlm_process_recovery_data(str
+- printk("]\n");
+- dlm_print_one_lock_resource(res);
+- BUG();
++ (ml->type == LKM_EXMODE ||
++ memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
++ u64 c = be64_to_cpu(lock->ml.cookie);
++ mlog(ML_ERROR, "%s:%.*s: received bad "
++ "lvb! type=%d, convtype=%d, "
++ "node=%u, cookie=%u:%llu\n",
++ dlm->name, res->lockname.len,
++ res->lockname.name, ml->type,
++ ml->convert_type, ml->node,
++ dlm_get_lock_cookie_node(c),
++ dlm_get_lock_cookie_seq(c));
++ printk("lockres lvb=[");
++ dlm_print_lvb(res->lvb);
++ printk("]\nmigrated lvb=[");
++ dlm_print_lvb(mres->lvb);
++ printk("]\n");
++ dlm_print_one_lock_resource(res);
++ BUG();
+ }
memcpy(res->lvb, mres->lvb, DLM_LVB_LEN);
}
}
@@ -129,7 +138,7 @@
/* NOTE:
* wrt lock queue ordering and recovery:
-@@ -1762,6 +1832,7 @@ static int dlm_process_recovery_data(str
+@@ -1761,6 +1831,7 @@
bad = 0;
spin_lock(&res->spinlock);
list_for_each_entry(lock, queue, list) {
Modified: branches/ocfs2-1.2-cert/patches/mar24-create-lock-handler.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/mar24-create-lock-handler.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/mar24-create-lock-handler.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmlock.c
===================================================================
---- fs/ocfs2/dlm/dlmlock.c.orig 2006-03-16 18:17:21.358926000 -0800
-+++ fs/ocfs2/dlm/dlmlock.c 2006-03-24 15:20:26.372564000 -0800
-@@ -280,6 +280,14 @@ static enum dlm_status dlm_send_remote_l
+--- fs/ocfs2/dlm/dlmlock.c.orig 2006-04-17 15:59:17.678740000 -0700
++++ fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:11:45.202243000 -0700
+@@ -280,6 +280,14 @@
if (tmpret >= 0) {
// successfully sent and received
ret = status; // this is already a dlm_status
@@ -17,7 +17,7 @@
} else {
mlog_errno(tmpret);
if (dlm_is_host_down(tmpret)) {
-@@ -428,11 +436,16 @@ int dlm_create_lock_handler(struct o2net
+@@ -428,11 +436,16 @@
if (!dlm_grab(dlm))
return DLM_REJECTED;
Modified: branches/ocfs2-1.2-cert/patches/mastery-restart-recovery.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/mastery-restart-recovery.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/mastery-restart-recovery.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- fs/ocfs2/dlm/dlmmaster.c.orig 2006-03-27 14:23:30.045812000 -0800
-+++ fs/ocfs2/dlm/dlmmaster.c 2006-03-27 14:23:30.283574000 -0800
-@@ -856,6 +856,7 @@ lookup:
+--- fs/ocfs2/dlm/dlmmaster.c.orig 2006-04-18 14:01:52.218442000 -0700
++++ fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:12:26.794818000 -0700
+@@ -856,6 +856,7 @@
spin_unlock(&dlm->master_lock);
spin_unlock(&dlm->spinlock);
@@ -10,7 +10,7 @@
while (wait_on_recovery) {
/* any cluster changes that occurred after dropping the
* dlm spinlock would be detectable be a change on the mle,
-@@ -893,7 +894,6 @@ lookup:
+@@ -893,7 +894,6 @@
if (blocked)
goto wait;
@@ -18,7 +18,7 @@
ret = -EINVAL;
dlm_node_iter_init(mle->vote_map, &iter);
while ((nodenum = dlm_node_iter_next(&iter)) >= 0) {
-@@ -918,7 +918,8 @@ wait:
+@@ -918,7 +918,8 @@
/* keep going until the response map includes all nodes */
ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked);
if (ret < 0) {
@@ -28,7 +28,7 @@
"master request now, blocked=%d\n",
dlm->name, res->lockname.len,
res->lockname.name, blocked);
-@@ -1199,7 +1200,60 @@ static int dlm_restart_lock_mastery(stru
+@@ -1199,7 +1200,60 @@
set_bit(node, mle->vote_map);
} else {
mlog(ML_ERROR, "node down! %d\n", node);
@@ -54,18 +54,18 @@
+ res->lockname.name,
+ lowest);
+ } else {
-+ /* mle is an MLE_BLOCK, but
++ /* mle is an MLE_BLOCK, but
+ * there is now nothing left to
+ * block on. we need to return
+ * all the way back out and try
-+ * again with an MLE_MASTER.
++ * again with an MLE_MASTER.
+ * dlm_do_local_recovery_cleanup
-+ * has already run, so the mle
++ * has already run, so the mle
+ * refcount is ok */
+ mlog(ML_NOTICE, "%s:%.*s: no "
+ "longer blocking. try to "
+ "master this here\n",
-+ dlm->name,
++ dlm->name,
+ res->lockname.len,
+ res->lockname.name);
+ mle->type = DLM_MLE_MASTER;
@@ -74,7 +74,7 @@
+ }
+ }
+
-+ /* now blank out everything, as if we had never
++ /* now blank out everything, as if we had never
+ * contacted anyone */
+ memset(mle->maybe_map, 0, sizeof(mle->maybe_map));
+ memset(mle->response_map, 0, sizeof(mle->response_map));
@@ -89,7 +89,7 @@
/* if the node wasn't involved in mastery skip it,
* but clear it out from the maps so that it will
* not affect mastery of this lockres */
-@@ -1207,7 +1261,6 @@ static int dlm_restart_lock_mastery(stru
+@@ -1207,7 +1261,6 @@
clear_bit(node, mle->vote_map);
if (!test_bit(node, mle->maybe_map))
goto next;
@@ -97,7 +97,7 @@
/* if we're already blocked on lock mastery, and the
* dead node wasn't the expected master, or there is
* another node in the maybe_map, keep waiting */
-@@ -1253,7 +1306,6 @@ static int dlm_restart_lock_mastery(stru
+@@ -1253,7 +1306,6 @@
ret = -EAGAIN;
goto next;
}
@@ -105,7 +105,7 @@
clear_bit(node, mle->maybe_map);
if (node > dlm->node_num)
goto next;
-@@ -1263,9 +1315,12 @@ static int dlm_restart_lock_mastery(stru
+@@ -1263,9 +1315,12 @@
* in the vote_map, removing this node. */
memset(mle->response_map, 0,
sizeof(mle->response_map));
Modified: branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/move-dlm-work-to-thread.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/dlm/dlmcommon.h
+Index: cert3/fs/ocfs2/dlm/dlmcommon.h
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-07 13:41:12.673120000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmcommon.h 2006-04-07 13:41:16.473842000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:19:59.460252000 -0700
++++ cert3/fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:20:20.392512000 -0700
@@ -121,12 +121,13 @@
struct o2hb_callback_func dlm_hb_down;
struct task_struct *dlm_thread_task;
@@ -28,10 +28,10 @@
void dlm_get(struct dlm_ctxt *dlm);
void dlm_put(struct dlm_ctxt *dlm);
-Index: cert2/fs/ocfs2/dlm/dlmdomain.c
+Index: cert3/fs/ocfs2/dlm/dlmdomain.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-07 13:41:12.784121000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmdomain.c 2006-04-07 13:41:16.465840000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:20:13.696518000 -0700
++++ cert3/fs/ocfs2/dlm/dlmdomain.c 2006-04-18 14:20:20.405513000 -0700
@@ -290,6 +290,7 @@
dlm_unregister_domain_handlers(dlm);
dlm_complete_thread(dlm);
@@ -87,10 +87,10 @@
kref_init(&dlm->dlm_refs, dlm_ctxt_release);
dlm->dlm_state = DLM_CTXT_NEW;
-Index: cert2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-07 13:41:12.826120000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmmaster.c 2006-04-07 13:41:18.939200000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:20:13.757456000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:20:20.426512000 -0700
@@ -2018,7 +2018,7 @@
list_add_tail(&item->list, &dlm->work_list);
spin_unlock(&dlm->work_lock);
@@ -100,10 +100,10 @@
return 0;
}
-Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-07 13:41:12.758120000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c 2006-04-07 13:49:28.604440000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:20:13.647566000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:20:20.452512000 -0700
@@ -149,6 +149,72 @@
spin_unlock(&dlm->spinlock);
}
@@ -229,10 +229,10 @@
leave:
dlm_put(dlm);
-Index: cert2/fs/ocfs2/dlm/dlmthread.c
+Index: cert3/fs/ocfs2/dlm/dlmthread.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-07 13:41:12.134293000 -0700
-+++ cert2/fs/ocfs2/dlm/dlmthread.c 2006-04-07 13:41:12.945120000 -0700
+--- cert3.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:16:13.371959000 -0700
++++ cert3/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:20:20.462502000 -0700
@@ -750,7 +750,7 @@
/* yield and continue right away if there is more work to do */
Modified: branches/ocfs2-1.2-cert/patches/never-purge-master.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/never-purge-master.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/never-purge-master.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c
+Index: cert3/fs/ocfs2/dlm/dlmthread.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmthread.c 2006-03-28 15:10:30.446654000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmthread.c 2006-03-28 15:17:09.805575000 -0800
-@@ -107,6 +107,21 @@ void __dlm_lockres_calc_usage(struct dlm
+--- cert3.orig/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:16:01.262910000 -0700
++++ cert3/fs/ocfs2/dlm/dlmthread.c 2006-04-18 14:16:13.371959000 -0700
+@@ -107,6 +107,21 @@
assert_spin_locked(&res->spinlock);
if (__dlm_lockres_unused(res)){
@@ -24,11 +24,11 @@
if (list_empty(&res->purge)) {
mlog(0, "putting lockres %.*s from purge list\n",
res->lockname.len, res->lockname.name);
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c
+Index: cert3/fs/ocfs2/dlm/dlmlock.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmlock.c 2006-03-28 16:59:05.728623000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmlock.c 2006-03-28 16:59:31.088542000 -0800
-@@ -226,14 +226,18 @@ static enum dlm_status dlmlock_remote(st
+--- cert3.orig/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:07.615656000 -0700
++++ cert3/fs/ocfs2/dlm/dlmlock.c 2006-04-18 14:16:13.380950000 -0700
+@@ -226,14 +226,18 @@
res->state &= ~DLM_LOCK_RES_IN_PROGRESS;
lock->lock_pending = 0;
if (status != DLM_NORMAL) {
Modified: branches/ocfs2-1.2-cert/patches/ocfs2-1.2-no-idr-0.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2-1.2-no-idr-0.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2-1.2-no-idr-0.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/cluster/net_proc.c
===================================================================
---- fs/ocfs2/cluster/net_proc.c (revision 2803)
-+++ fs/ocfs2/cluster/net_proc.c (working copy)
-@@ -117,6 +117,7 @@ static int nst_seq_show(struct seq_file
+--- fs/ocfs2/cluster/net_proc.c.orig 2006-04-17 15:59:09.204309000 -0700
++++ fs/ocfs2/cluster/net_proc.c 2006-04-18 14:16:26.301852000 -0700
+@@ -117,6 +117,7 @@
" process name: %s\n"
" node: %u\n"
" sc: %p\n"
@@ -10,7 +10,7 @@
" message type: %u\n"
" message key: 0x%08x\n"
" sock acquiry: %lu.%lu\n"
-@@ -125,7 +126,8 @@ static int nst_seq_show(struct seq_file
+@@ -125,7 +126,8 @@
nst, (unsigned long)nst->st_task->pid,
(unsigned long)nst->st_task->tgid,
nst->st_task->comm, nst->st_node,
@@ -20,7 +20,7 @@
nst->st_sock_time.tv_sec, nst->st_sock_time.tv_usec,
nst->st_send_time.tv_sec, nst->st_send_time.tv_usec,
nst->st_status_time.tv_sec,
-@@ -253,6 +255,8 @@ static void *sc_seq_next(struct seq_file
+@@ -253,6 +255,8 @@
return sc; /* unused, just needs to be null when done */
}
@@ -29,7 +29,7 @@
static int sc_seq_show(struct seq_file *seq, void *v)
{
struct o2net_sock_container *sc, *dummy_sc = seq->private;
-@@ -285,11 +289,31 @@ static int sc_seq_show(struct seq_file *
+@@ -285,11 +289,31 @@
" krefs: %d\n"
" sock: %u.%u.%u.%u:%u -> %u.%u.%u.%u:%u\n"
" remote node: %s\n"
@@ -67,8 +67,8 @@
Index: fs/ocfs2/cluster/tcp.c
===================================================================
---- fs/ocfs2/cluster/tcp.c (revision 2803)
-+++ fs/ocfs2/cluster/tcp.c (working copy)
+--- fs/ocfs2/cluster/tcp.c.orig 2006-04-17 15:59:09.209306000 -0700
++++ fs/ocfs2/cluster/tcp.c 2006-04-18 14:16:26.342811000 -0700
@@ -56,7 +56,6 @@
#include <linux/kernel.h>
#include <linux/jiffies.h>
@@ -77,7 +77,7 @@
#include <linux/kref.h>
#include <net/tcp.h>
-@@ -173,39 +172,18 @@ static u8 o2net_num_from_nn(struct o2net
+@@ -173,39 +172,18 @@
/* ------------------------------------------------------------ */
@@ -125,7 +125,7 @@
}
static void o2net_complete_nsw_locked(struct o2net_node *nn,
-@@ -219,31 +197,43 @@ static void o2net_complete_nsw_locked(st
+@@ -219,31 +197,43 @@
list_del_init(&nsw->ns_node_item);
nsw->ns_sys_status = sys_status;
nsw->ns_status = status;
@@ -183,7 +183,7 @@
}
static void o2net_complete_nodes_nsw(struct o2net_node *nn)
-@@ -951,11 +941,10 @@ int o2net_send_message_vec(u32 msg_type,
+@@ -951,11 +941,10 @@
vec[0].iov_base = msg;
memcpy(&vec[1], caller_vec, caller_veclen * sizeof(struct kvec));
@@ -197,7 +197,7 @@
do_gettimeofday(&nst.st_send_time);
/* finally, convert the message header to network byte-order
-@@ -989,7 +978,7 @@ out:
+@@ -989,7 +978,7 @@
kfree(vec);
if (msg)
kfree(msg);
@@ -206,7 +206,7 @@
return ret;
}
EXPORT_SYMBOL_GPL(o2net_send_message_vec);
-@@ -1045,10 +1034,9 @@ static int o2net_process_message(struct
+@@ -1045,10 +1034,9 @@
switch(be16_to_cpu(hdr->magic)) {
case O2NET_MSG_STATUS_MAGIC:
/* special type for returning message status */
@@ -220,7 +220,7 @@
goto out;
case O2NET_MSG_KEEP_REQ_MAGIC:
o2net_sendpage(sc, o2net_keep_resp,
-@@ -1865,7 +1853,6 @@ int o2net_init(void)
+@@ -1865,7 +1853,6 @@
/* until we see hb from a node we'll return einval */
nn->nn_persistent_error = -ENOTCONN;
init_waitqueue_head(&nn->nn_sc_wq);
@@ -230,9 +230,9 @@
Index: fs/ocfs2/cluster/tcp_internal.h
===================================================================
---- fs/ocfs2/cluster/tcp_internal.h (revision 2803)
-+++ fs/ocfs2/cluster/tcp_internal.h (working copy)
-@@ -62,7 +62,7 @@ struct o2net_node {
+--- fs/ocfs2/cluster/tcp_internal.h.orig 2006-04-17 15:59:09.452308000 -0700
++++ fs/ocfs2/cluster/tcp_internal.h 2006-04-18 14:16:26.364789000 -0700
+@@ -62,7 +62,7 @@
* or fails or when an accepted socket is attached. */
wait_queue_head_t nn_sc_wq;
@@ -241,7 +241,7 @@
struct list_head nn_status_list;
/* connects are attempted from when heartbeat comes up until either hb
-@@ -160,7 +160,7 @@ enum o2net_system_error {
+@@ -160,7 +160,7 @@
struct o2net_status_wait {
enum o2net_system_error ns_sys_status;
s32 ns_status;
@@ -250,7 +250,7 @@
wait_queue_head_t ns_wq;
struct list_head ns_node_item;
};
-@@ -170,6 +170,7 @@ struct o2net_send_tracking {
+@@ -170,6 +170,7 @@
struct list_head st_net_proc_item;
struct task_struct *st_task;
struct o2net_sock_container *st_sc;
Modified: branches/ocfs2-1.2-cert/patches/ocfs2-extend_tracing2.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2-extend_tracing2.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2-extend_tracing2.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/file.c
===================================================================
---- fs/ocfs2/file.c (revision 2788)
-+++ fs/ocfs2/file.c (working copy)
-@@ -733,7 +733,8 @@ leave:
+--- fs/ocfs2/file.c.orig 2006-04-17 15:59:26.569849000 -0700
++++ fs/ocfs2/file.c 2006-04-18 14:00:37.937167000 -0700
+@@ -733,7 +733,8 @@
int ocfs2_extend_file(struct ocfs2_super *osb,
struct inode *inode,
u64 new_i_size,
@@ -12,7 +12,7 @@
{
int status = 0;
int restart_func = 0;
-@@ -747,6 +748,8 @@ int ocfs2_extend_file(struct ocfs2_super
+@@ -747,6 +748,8 @@
struct ocfs2_alloc_context *data_ac = NULL;
struct ocfs2_alloc_context *meta_ac = NULL;
enum ocfs2_alloc_restarted why;
@@ -21,7 +21,7 @@
mlog_entry("(Inode %"MLFu64" new_i_size=%"MLFu64")\n",
OCFS2_I(inode)->ip_blkno, new_i_size);
-@@ -758,6 +761,8 @@ int ocfs2_extend_file(struct ocfs2_super
+@@ -758,6 +761,8 @@
goto leave;
restart_all:
@@ -30,7 +30,7 @@
handle = ocfs2_alloc_handle(osb);
if (handle == NULL) {
status = -ENOMEM;
-@@ -778,18 +783,23 @@ restart_all:
+@@ -778,18 +783,23 @@
status = -EIO;
goto leave;
}
@@ -66,7 +66,7 @@
if (i_size_read(inode) == new_i_size)
goto leave;
-@@ -852,6 +862,7 @@ do_start_trans:
+@@ -852,6 +862,7 @@
}
restarted_transaction:
@@ -74,7 +74,7 @@
/* reserve a write to the file entry early on - that we if we
* run out of credits in the allocation path, we can still
* update i_size. */
-@@ -1039,7 +1050,7 @@ int ocfs2_setattr(struct dentry *dentry,
+@@ -1039,7 +1050,7 @@
status = ocfs2_truncate_file(osb, newsize, inode);
else
status = ocfs2_extend_file(osb, inode, newsize,
@@ -85,9 +85,9 @@
mlog_errno(status);
Index: fs/ocfs2/file.h
===================================================================
---- fs/ocfs2/file.h (revision 2788)
-+++ fs/ocfs2/file.h (working copy)
-@@ -50,7 +50,8 @@ int ocfs2_sync_inode(struct inode *inode
+--- fs/ocfs2/file.h.orig 2006-04-17 15:59:26.575850000 -0700
++++ fs/ocfs2/file.h 2006-04-18 14:00:37.964140000 -0700
+@@ -50,7 +50,8 @@
int ocfs2_extend_file(struct ocfs2_super *osb,
struct inode *inode,
u64 new_i_size,
@@ -99,9 +99,9 @@
struct inode *inode,
Index: fs/ocfs2/mmap.c
===================================================================
---- fs/ocfs2/mmap.c (revision 2788)
-+++ fs/ocfs2/mmap.c (working copy)
-@@ -529,6 +529,7 @@ ssize_t ocfs2_write_lock_maybe_extend(st
+--- fs/ocfs2/mmap.c.orig 2006-04-17 15:59:26.742849000 -0700
++++ fs/ocfs2/mmap.c 2006-04-18 14:00:37.977127000 -0700
+@@ -529,6 +529,7 @@
int level = filp->f_flags & O_APPEND;
loff_t saved_ppos;
u64 bytes_added = 0;
@@ -109,7 +109,7 @@
osb = OCFS2_SB(inode->i_sb);
-@@ -675,11 +676,12 @@ lock:
+@@ -675,11 +676,12 @@
"i_size=%lld, need=%"MLFu64"\n", i_size_read(inode),
info->wl_newsize);
Modified: branches/ocfs2-1.2-cert/patches/ocfs2-journal_start_stop_msgs.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2-journal_start_stop_msgs.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2-journal_start_stop_msgs.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/journal.c
===================================================================
---- fs/ocfs2/journal.c (revision 2787)
-+++ fs/ocfs2/journal.c (working copy)
-@@ -1029,6 +1031,8 @@ static int __ocfs2_recovery_thread(void
+--- fs/ocfs2/journal.c.orig 2006-04-17 15:59:26.263850000 -0700
++++ fs/ocfs2/journal.c 2006-04-18 14:00:45.776773000 -0700
+@@ -1029,6 +1029,8 @@
}
restart:
@@ -11,7 +11,7 @@
status = ocfs2_super_lock(osb, 1);
if (status < 0) {
mlog_errno(status);
-@@ -1043,6 +1047,7 @@ restart:
+@@ -1043,6 +1045,7 @@
break;
}
@@ -19,7 +19,7 @@
status = ocfs2_recover_node(osb, node_num);
if (status < 0) {
mlog(ML_ERROR,
-@@ -1052,11 +1057,13 @@ restart:
+@@ -1052,11 +1055,13 @@
mlog(ML_ERROR, "Volume requires unmount.\n");
continue;
}
@@ -34,4 +34,3 @@
/* We always run recovery on our own orphan dir - the dead
* node(s) may have voted "no" on an inode delete earlier. A
* revote is therefore required. */
-
Modified: branches/ocfs2-1.2-cert/patches/ocfs2-reco_nofs.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2-reco_nofs.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2-reco_nofs.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/journal.c
===================================================================
---- fs/ocfs2/journal.c (revision 2787)
-+++ fs/ocfs2/journal.c (working copy)
-@@ -858,9 +858,11 @@ static int ocfs2_force_read_journal(stru
+--- fs/ocfs2/journal.c.orig 2006-04-18 14:00:45.776773000 -0700
++++ fs/ocfs2/journal.c 2006-04-18 14:00:53.905090000 -0700
+@@ -858,9 +858,11 @@
if (p_blocks > CONCURRENT_JOURNAL_FILL)
p_blocks = CONCURRENT_JOURNAL_FILL;
@@ -17,9 +17,9 @@
goto bail;
Index: fs/ocfs2/uptodate.c
===================================================================
---- fs/ocfs2/uptodate.c (revision 2787)
-+++ fs/ocfs2/uptodate.c (working copy)
-@@ -335,7 +335,7 @@ static void __ocfs2_set_buffer_uptodate(
+--- fs/ocfs2/uptodate.c.orig 2006-04-17 15:59:25.782171000 -0700
++++ fs/ocfs2/uptodate.c 2006-04-18 14:00:53.923072000 -0700
+@@ -335,7 +335,7 @@
mlog(0, "Inode %"MLFu64", block %llu, expand = %d\n",
oi->ip_blkno, (unsigned long long) block, expand_tree);
@@ -28,7 +28,7 @@
if (!new) {
mlog_errno(-ENOMEM);
return;
-@@ -347,7 +347,7 @@ static void __ocfs2_set_buffer_uptodate(
+@@ -347,7 +347,7 @@
* has no way of tracking that. */
for(i = 0; i < OCFS2_INODE_MAX_CACHE_ARRAY; i++) {
tree[i] = kmem_cache_alloc(ocfs2_uptodate_cachep,
@@ -37,4 +37,3 @@
if (!tree[i]) {
mlog_errno(-ENOMEM);
goto out_free;
-
Modified: branches/ocfs2-1.2-cert/patches/ocfs2_dlm-do_lvb_puts_inline2.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2_dlm-do_lvb_puts_inline2.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2_dlm-do_lvb_puts_inline2.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmconvert.c
===================================================================
---- fs/ocfs2/dlm/dlmconvert.c (revision 2787)
-+++ fs/ocfs2/dlm/dlmconvert.c (working copy)
-@@ -214,6 +214,9 @@ grant:
+--- fs/ocfs2/dlm/dlmconvert.c.orig 2006-04-17 15:59:24.924459000 -0700
++++ fs/ocfs2/dlm/dlmconvert.c 2006-04-18 14:00:56.482362000 -0700
+@@ -214,6 +214,9 @@
if (lock->ml.node == dlm->node_num)
mlog(0, "doing in-place convert for nonlocal lock\n");
lock->ml.type = type;
@@ -14,9 +14,9 @@
goto unlock_exit;
Index: fs/ocfs2/dlm/dlmast.c
===================================================================
---- fs/ocfs2/dlm/dlmast.c (revision 2787)
-+++ fs/ocfs2/dlm/dlmast.c (working copy)
-@@ -197,12 +197,20 @@ static void dlm_update_lvb(struct dlm_ct
+--- fs/ocfs2/dlm/dlmast.c.orig 2006-04-17 15:59:25.041341000 -0700
++++ fs/ocfs2/dlm/dlmast.c 2006-04-18 14:00:56.503362000 -0700
+@@ -197,12 +197,20 @@
lock->ml.node == dlm->node_num ? "master" :
"remote");
memcpy(lksb->lvb, res->lvb, DLM_LVB_LEN);
Modified: branches/ocfs2-1.2-cert/patches/ocfs2_heartbeat-better_I_O_error_handling.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/ocfs2_heartbeat-better_I_O_error_handling.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/ocfs2_heartbeat-better_I_O_error_handling.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -3,9 +3,9 @@
Index: fs/ocfs2/cluster/heartbeat.c
===================================================================
---- fs/ocfs2/cluster/heartbeat.c (revision 2788)
-+++ fs/ocfs2/cluster/heartbeat.c (working copy)
-@@ -165,6 +165,7 @@ static spinlock_t o2hb_blocker_lock = SP
+--- fs/ocfs2/cluster/heartbeat.c.orig 2006-04-17 15:59:13.419023000 -0700
++++ fs/ocfs2/cluster/heartbeat.c 2006-04-18 14:16:10.289006000 -0700
+@@ -165,6 +165,7 @@
struct o2hb_bio_wait_ctxt {
atomic_t wc_num_reqs;
struct completion wc_io_complete;
@@ -13,7 +13,7 @@
};
static unsigned int o2hb_elapsed_msecs(struct timeval *start,
-@@ -293,6 +294,7 @@ static inline void o2hb_bio_wait_init(st
+@@ -293,6 +294,7 @@
{
atomic_set(&wc->wc_num_reqs, num_ios);
init_completion(&wc->wc_io_complete);
@@ -21,7 +21,7 @@
}
/* Used in error paths too */
-@@ -325,8 +327,10 @@ static int o2hb_bio_end_io(struct bio *b
+@@ -325,8 +327,10 @@
{
struct o2hb_bio_wait_ctxt *wc = bio->bi_private;
@@ -33,7 +33,7 @@
if (bio->bi_size)
return 1;
-@@ -515,6 +519,8 @@ static int o2hb_read_slots(struct o2hb_r
+@@ -515,6 +519,8 @@
bail_and_wait:
o2hb_mlog_blocking(reg, &start, "waiting for read completion");
o2hb_wait_on_io(reg, &wc);
@@ -42,7 +42,7 @@
o2hb_mlog_blocking_done(reg, &start);
if (bios) {
-@@ -917,7 +923,7 @@ static int o2hb_highest_node(unsigned lo
+@@ -917,7 +923,7 @@
return highest;
}
@@ -51,7 +51,7 @@
{
int i, ret, highest_node, change = 0;
unsigned long configured_nodes[BITS_TO_LONGS(O2NM_MAX_NODES)];
-@@ -925,13 +931,17 @@ static void o2hb_do_disk_heartbeat(struc
+@@ -925,13 +931,17 @@
struct o2hb_bio_wait_ctxt write_wc;
struct timeval start;
@@ -72,7 +72,7 @@
}
/* No sense in reading the slots of nodes that don't exist
-@@ -941,7 +951,7 @@ static void o2hb_do_disk_heartbeat(struc
+@@ -941,7 +951,7 @@
ret = o2hb_read_slots(reg, highest_node + 1);
if (ret < 0) {
mlog_errno(ret);
@@ -81,7 +81,7 @@
}
/* With an up to date view of the slots, we can check that no
-@@ -959,7 +969,7 @@ static void o2hb_do_disk_heartbeat(struc
+@@ -959,7 +969,7 @@
ret = o2hb_issue_node_write(reg, &write_bio, &write_wc);
if (ret < 0) {
mlog_errno(ret);
@@ -90,7 +90,7 @@
}
o2hb_mlog_blocking(reg, &start, "checking slots");
-@@ -979,6 +989,15 @@ static void o2hb_do_disk_heartbeat(struc
+@@ -979,6 +989,15 @@
o2hb_wait_on_io(reg, &write_wc);
o2hb_mlog_blocking_done(reg, &start);
bio_put(write_bio);
@@ -106,7 +106,7 @@
o2hb_arm_write_timeout(reg);
/* let the person who launched us know when things are steady */
-@@ -986,6 +1005,8 @@ static void o2hb_do_disk_heartbeat(struc
+@@ -986,6 +1005,8 @@
if (atomic_dec_and_test(®->hr_steady_iterations))
wake_up(&o2hb_steady_queue);
}
@@ -115,7 +115,7 @@
}
/* Subtract b from a, storing the result in a. a *must* have a larger
-@@ -1045,7 +1066,10 @@ static int o2hb_thread(void *data)
+@@ -1045,7 +1066,10 @@
* likely to time itself out. */
do_gettimeofday(&before_hb);
Modified: branches/ocfs2-1.2-cert/patches/reassert-vs-migration.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/reassert-vs-migration.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/reassert-vs-migration.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
-Index: ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c
+Index: cert3/fs/ocfs2/dlm/dlmmaster.c
===================================================================
---- ocfs2-1.2.orig/fs/ocfs2/dlm/dlmmaster.c 2006-03-28 15:10:30.523654000 -0800
-+++ ocfs2-1.2/fs/ocfs2/dlm/dlmmaster.c 2006-03-28 18:05:33.960016000 -0800
-@@ -2056,6 +2056,24 @@ void dlm_assert_master_worker(struct dlm
+--- cert3.orig/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:16:04.697622000 -0700
++++ cert3/fs/ocfs2/dlm/dlmmaster.c 2006-04-18 14:16:16.525841000 -0700
+@@ -2056,6 +2056,24 @@
}
}
@@ -27,7 +27,7 @@
/* this call now finishes out the nodemap
* even if one or more nodes die */
mlog(0, "worker about to master %.*s here, this=%u\n",
-@@ -2068,6 +2086,10 @@ void dlm_assert_master_worker(struct dlm
+@@ -2068,6 +2086,10 @@
mlog_errno(ret);
}
Modified: branches/ocfs2-1.2-cert/patches/remove-bad-spin-unlock.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/remove-bad-spin-unlock.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/remove-bad-spin-unlock.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,7 +1,7 @@
-Index: cert2/fs/ocfs2/dlm/dlmrecovery.c
+Index: cert3/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- cert2.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-03-30 23:37:30.413174000 -0800
-+++ cert2/fs/ocfs2/dlm/dlmrecovery.c 2006-03-30 23:46:35.496319000 -0800
+--- cert3.orig/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:23.775504000 -0700
++++ cert3/fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:16:32.211928000 -0700
@@ -649,7 +649,6 @@
"requesting recovery info for "
"node %u\n", ndata->node_num,
Modified: branches/ocfs2-1.2-cert/patches/series
===================================================================
--- branches/ocfs2-1.2-cert/patches/series 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/series 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,5 +1,20 @@
em-silence-eexist.patch -p0
-mar20-full-3.patch -p0
+dlm-add-migration-delay.patch
+dlm-recheck-master-on-unlock.patch
+dlm-fix-dlm_is_node_dead.patch
+dlm-fix-lvb-empty-check.patch
+dlm-cleanup-reco-state-changes.patch
+dlm-catch-bad-reco-state.patch
+dlm-handle-reco-network-errors.patch
+dlm-reco-debug-mlogs.patch
+dlm-mle-debugging.patch
+dlm-fix-mle-refcount-while-inuse.patch
+dlm-detach-from-hb-events.patch
+dlm-allow-recovery-to-start.patch
+dlm-init-mle-when-used.patch
+dlm-fix-migration-asserts.patch
+dlm-allow-for-assert-while-in-progress.patch
+dlm-mastery-debug-mlogs.patch
ocfs2-extend_tracing2.patch -p0
ocfs2-journal_start_stop_msgs.patch -p0
ocfs2-reco_nofs.patch -p0
Modified: branches/ocfs2-1.2-cert/patches/two-stage-finalize.patch
===================================================================
--- branches/ocfs2-1.2-cert/patches/two-stage-finalize.patch 2006-04-12 21:53:40 UTC (rev 2841)
+++ branches/ocfs2-1.2-cert/patches/two-stage-finalize.patch 2006-04-18 21:34:14 UTC (rev 2842)
@@ -1,8 +1,8 @@
Index: fs/ocfs2/dlm/dlmcommon.h
===================================================================
---- fs/ocfs2/dlm/dlmcommon.h.orig 2006-03-22 14:36:02.379128000 -0800
-+++ fs/ocfs2/dlm/dlmcommon.h 2006-03-22 14:36:02.448059000 -0800
-@@ -61,7 +61,8 @@ static inline int dlm_is_recovery_lock(c
+--- fs/ocfs2/dlm/dlmcommon.h.orig 2006-04-18 14:01:04.173802000 -0700
++++ fs/ocfs2/dlm/dlmcommon.h 2006-04-18 14:01:07.715809000 -0700
+@@ -61,7 +61,8 @@
return 0;
}
@@ -12,7 +12,7 @@
struct dlm_recovery_ctxt
{
-@@ -618,7 +619,8 @@ struct dlm_finalize_reco
+@@ -618,7 +619,8 @@
{
u8 node_idx;
u8 dead_node;
@@ -24,9 +24,9 @@
Index: fs/ocfs2/dlm/dlmrecovery.c
===================================================================
---- fs/ocfs2/dlm/dlmrecovery.c.orig 2006-03-22 14:36:02.372135000 -0800
-+++ fs/ocfs2/dlm/dlmrecovery.c 2006-03-22 14:36:02.462056000 -0800
-@@ -134,12 +134,18 @@ static inline void dlm_set_reco_master(s
+--- fs/ocfs2/dlm/dlmrecovery.c.orig 2006-04-18 14:01:04.152803000 -0700
++++ fs/ocfs2/dlm/dlmrecovery.c 2006-04-18 14:01:36.169562000 -0700
+@@ -134,12 +134,18 @@
dlm->reco.new_master = master;
}
@@ -47,16 +47,16 @@
spin_unlock(&dlm->spinlock);
}
-@@ -380,7 +386,7 @@ void dlm_wait_for_recovery(struct dlm_ct
+@@ -380,7 +386,7 @@
dlm->name, dlm->dlm_reco_thread_task->pid,
dlm->reco.state, dlm->reco.new_master,
dlm->reco.dead_node);
- dlm_print_reco_junk(dlm);
+ //dlm_print_reco_junk(dlm);
}
-
+
while (1) {
-@@ -393,7 +399,7 @@ void dlm_wait_for_recovery(struct dlm_ct
+@@ -393,7 +399,7 @@
dlm->name, dlm->dlm_reco_thread_task->pid,
dlm->reco.state, dlm->reco.new_master,
dlm->reco.dead_node);
@@ -65,7 +65,7 @@
}
// wait_event(dlm->reco.event, !dlm_in_recovery(dlm));
}
-@@ -429,6 +435,7 @@ int dlm_do_recovery(struct dlm_ctxt *dlm
+@@ -429,6 +435,7 @@
dlm->reco.new_master, dlm->reco.dead_node);
/* unset the new_master, leave dead_node */
dlm_set_reco_master(dlm, O2NM_INVALID_NODE_NUM);
@@ -73,7 +73,7 @@
}
/* select a target to recover */
-@@ -521,6 +528,7 @@ static int dlm_remaster_locks(struct dlm
+@@ -521,6 +528,7 @@
int all_nodes_done;
int destroy = 0;
int pass = 0;
@@ -81,7 +81,7 @@
status = dlm_init_recovery_area(dlm, dead_node);
if (status < 0)
-@@ -559,9 +567,9 @@ static int dlm_remaster_locks(struct dlm
+@@ -559,9 +567,9 @@
BUG();
break;
case DLM_RECO_NODE_DATA_DEAD:
@@ -94,7 +94,7 @@
// start all over
destroy = 1;
status = -EAGAIN;
-@@ -593,6 +601,7 @@ static int dlm_remaster_locks(struct dlm
+@@ -593,6 +601,7 @@
while (1) {
/* check all the nodes now to see if we are
* done, or if anyone died */
@@ -102,7 +102,7 @@
all_nodes_done = 1;
spin_lock(&dlm_reco_state_lock);
list_for_each(iter, &dlm->reco.node_data) {
-@@ -633,7 +642,13 @@ static int dlm_remaster_locks(struct dlm
+@@ -633,7 +642,13 @@
goto leave;
case DLM_RECO_NODE_DATA_RECEIVING:
case DLM_RECO_NODE_DATA_REQUESTED:
@@ -117,7 +117,7 @@
dlm->name, ndata->node_num,
ndata->state==DLM_RECO_NODE_DATA_RECEIVING ?
"receiving" : "requested");
-@@ -651,7 +666,7 @@ static int dlm_remaster_locks(struct dlm
+@@ -651,7 +666,7 @@
}
spin_unlock(&dlm_reco_state_lock);
@@ -126,8 +126,8 @@
all_nodes_done?"yes":"no");
if (all_nodes_done) {
int ret;
-@@ -1708,8 +1723,19 @@ static int dlm_process_recovery_data(str
- if (!dlm_lvb_is_empty(res->lvb) &&
+@@ -1707,8 +1722,19 @@
+ if (!dlm_lvb_is_empty(res->lvb) &&
(ml->type == LKM_EXMODE ||
memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
- mlog(ML_ERROR, "received bad lvb!\n");
@@ -135,7 +135,7 @@
+ int i;
+ mlog(ML_ERROR, "%s:%.*s: received bad "
+ "lvb! type=%d\n", dlm->name,
-+ res->lockname.len,
++ res->lockname.len,
+ res->lockname.name, ml->type);
+ printk("lockres lvb=[");
+ for (i=0; i<DLM_LVB_LEN; i++)
@@ -148,7 +148,7 @@
BUG();
}
memcpy(res->lvb, mres->lvb, DLM_LVB_LEN);
-@@ -2099,6 +2125,20 @@ void __dlm_hb_node_down(struct dlm_ctxt
+@@ -2098,6 +2124,20 @@
{
assert_spin_locked(&dlm->spinlock);
@@ -169,7 +169,7 @@
/* check to see if the node is already considered dead */
if (!test_bit(idx, dlm->live_nodes_map)) {
mlog(0, "for domain %s, node %d is already dead. "
-@@ -2405,6 +2445,13 @@ retry:
+@@ -2404,6 +2444,13 @@
* another ENOMEM */
msleep(100);
goto retry;
@@ -183,11 +183,10 @@
}
}
-@@ -2419,6 +2466,17 @@ int dlm_begin_reco_handler(struct o2net_
- /* ok to return 0, domain has gone away */
+@@ -2419,6 +2466,17 @@
if (!dlm_grab(dlm))
return 0;
-+
+
+ spin_lock(&dlm->spinlock);
+ if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) {
+ mlog(ML_NOTICE, "%s: node %u wants to recover node %u (%u:%u) "
@@ -198,10 +197,11 @@
+ return EAGAIN;
+ }
+ spin_unlock(&dlm->spinlock);
-
++
mlog(ML_NOTICE, "%s: node %u wants to recover node %u (%u:%u)\n",
dlm->name, br->node_idx, br->dead_node,
-@@ -2473,6 +2531,7 @@ int dlm_begin_reco_handler(struct o2net_
+ dlm->reco.dead_node, dlm->reco.new_master);
+@@ -2472,6 +2530,7 @@
return 0;
}
@@ -209,7 +209,7 @@
static int dlm_send_finalize_reco_message(struct dlm_ctxt *dlm)
{
int ret = 0;
-@@ -2480,25 +2539,31 @@ static int dlm_send_finalize_reco_messag
+@@ -2479,25 +2538,31 @@
struct dlm_node_iter iter;
int nodenum;
int status;
@@ -229,7 +229,7 @@
fr.node_idx = dlm->node_num;
fr.dead_node = dlm->reco.dead_node;
+ if (stage == 2)
-+ fr.flags |= DLM_FINALIZE_STAGE2;
++ fr.flags |= DLM_FINALIZE_STAGE2;
while ((nodenum = dlm_node_iter_next(&iter)) >= 0) {
if (nodenum == dlm->node_num)
@@ -244,7 +244,7 @@
if (dlm_is_host_down(ret)) {
/* this has no effect on this recovery
* session, so set the status to zero to
-@@ -2507,12 +2572,15 @@ static int dlm_send_finalize_reco_messag
+@@ -2506,12 +2571,15 @@
"node finished recovery.\n", nodenum);
ret = 0;
}
@@ -263,7 +263,7 @@
return ret;
}
-@@ -2521,14 +2589,18 @@ int dlm_finalize_reco_handler(struct o2n
+@@ -2520,14 +2588,18 @@
{
struct dlm_ctxt *dlm = data;
struct dlm_finalize_reco *fr = (struct dlm_finalize_reco *)msg->buf;
@@ -285,7 +285,7 @@
spin_lock(&dlm->spinlock);
-@@ -2545,13 +2617,38 @@ int dlm_finalize_reco_handler(struct o2n
+@@ -2544,13 +2616,38 @@
BUG();
}
More information about the Ocfs2-commits
mailing list