Skip to content

Commit df016c6

Browse files
Sunil Mushranjlbec
authored andcommitted
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. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <jlbec@evilplan.org>
1 parent 10b3dd7 commit df016c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ocfs2/dlm/dlmmaster.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2574,6 +2574,9 @@ static int dlm_migrate_lockres(struct dlm_ctxt *dlm,
25742574
res->state &= ~DLM_LOCK_RES_MIGRATING;
25752575
wake = 1;
25762576
spin_unlock(&res->spinlock);
2577+
if (dlm_is_host_down(ret))
2578+
dlm_wait_for_node_death(dlm, target,
2579+
DLM_NODE_DEATH_WAIT_MAX);
25772580
goto leave;
25782581
}
25792582

0 commit comments

Comments
 (0)