From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sunil Mushran Date: Wed, 04 May 2011 10:43:53 -0700 Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: Target node death during resource migration leads to thread spin In-Reply-To: <1304530489-16123-1-git-send-email-sunil.mushran@oracle.com> References: <1304530489-16123-1-git-send-email-sunil.mushran@oracle.com> Message-ID: <4DC19059.2010501@oracle.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ocfs2-devel@oss.oracle.com 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 On 05/04/2011 10:34 AM, Sunil Mushran wrote: > 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 > --- > fs/ocfs2/dlm/dlmmaster.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c > index 4499d86..4a780a3 100644 > --- a/fs/ocfs2/dlm/dlmmaster.c > +++ b/fs/ocfs2/dlm/dlmmaster.c > @@ -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; > }