[Ocfs2-devel] [PATCH] ocfs2/dlm: don't handle migrate lockres if already in shutdown
Andrew Morton
akpm at linux-foundation.org
Thu Mar 1 15:29:31 PST 2018
On Thu, 1 Mar 2018 20:37:50 +0800 piaojun <piaojun at huawei.com> wrote:
> Hi Changwei,
>
> Thanks for your quick reply, please see my comments below.
>
> On 2018/3/1 17:39, Changwei Ge wrote:
> > Hi Jun,
> >
> > On 2018/3/1 17:27, piaojun wrote:
> >> We should not handle migrate lockres if we are already in
> >> 'DLM_CTXT_IN_SHUTDOWN', as that will cause lockres remains after
> >> leaving dlm domain. At last other nodes will get stuck into infinite
> >> loop when requsting lock from us.
> >>
> >> N1 N2 (owner)
> >> touch file
> >>
> >> access the file,
> >> and get pr lock
> >>
> >> umount
> >>
> >
> > Before migrating all lock resources, N1 should have already sent
> > DLM_BEGIN_EXIT_DOMAIN_MSG in dlm_begin_exit_domain().
> > N2 will set ->exit_domain_map later.
> > So N2 can't take N1 as migration target.
> Before receiveing N1's DLM_BEGIN_EXIT_DOMAIN_MSG, N2 has picked up N1 as
> the migrate target. So N2 will continue sending lockres to N1 even though
> N1 has left domain. Sorry for making you misunderstanding, I will give a
> more detailed description.
>
> N1 N2 (owner)
> touch file
>
> access the file,
> and get pr lock
>
> begin leave domain and
> pick up N1 as new owner
>
> begin leave domain and
> migrate all lockres done
>
> begin migrate lockres to N1
>
> end leave domain, but
> the lockres left
> unexpectedly, because
> migrate task has passed
If someone asked a question then this is a sign that the changelog was
missing details. So please do send along a v2 with a more
comprehensive changelog.
More information about the Ocfs2-devel
mailing list