Skip to contentSkip to conversation

ocfs2/dlm: Target node death during resource migration leads to thread spin

PATCH New Sunil Mushran 2 participants 3 messages May 4, 2011 – May 5, 2011 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2/dlm: Target node death during resource migration leads to thread spin

During resource migration, if the target node were to die, the thread doing the migration spins until the target node is not removed from the domain map. This patch slows the spin by making the thread wait for the recovery to kick in.

---
 fs/ocfs2/dlm/dlmmaster.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +3 -0
index 4499d86..4a780a3 100644
@@ -2522,6 +2522,9 @@ fail:
 		res->state &= ~DLM_LOCK_RES_MIGRATING;
 		wake = 1;
 		spin_unlock(&res->spinlock);
+		if (dlm_is_host_down(ret))
+			dlm_wait_for_node_death(dlm, target,
+						DLM_NODE_DEATH_WAIT_MAX);
 		goto leave;
 	}
 
Signature · 1 line
1.7.4.1
#1 lore raw

PATCH 1/1 ocfs2/dlm: Target node death during resource migration leads to thread spin

Joel,

FYI

The list of pending patches from my end are available here:
http://oss.oracle.com/~smushran/ocfs2-pending-patches/fs-may04/

Thanks
Sunil

Quoted 22 lines · Sunil Mushran

During resource migration, if the target node were to die, the thread doing the migration spins until the target node is not removed from the domain map. This patch slows the spin by making the thread wait for the recovery to kick in.

---
  fs/ocfs2/dlm/dlmmaster.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)
fs/ocfs2/dlm/dlmmaster.c +3 -0
index 4499d86..4a780a3 100644
@@ -2522,6 +2522,9 @@ fail:
  		res->state&= ~DLM_LOCK_RES_MIGRATING;
  		wake = 1;
  		spin_unlock(&res->spinlock);
+		if (dlm_is_host_down(ret))
+			dlm_wait_for_node_death(dlm, target,
+						DLM_NODE_DEATH_WAIT_MAX);
  		goto leave;
  	}
#2 lore raw

PATCH 1/1 ocfs2/dlm: Target node death during resource migration leads to thread spin

In reply to Sunil Mushran
Quoted 5 lines · Sunil Mushran

During resource migration, if the target node were to die, the thread doing the migration spins until the target node is not removed from the domain map. This patch slows the spin by making the thread wait for the recovery to kick in.

--
Mark Fasheh