From: Srinivas Eeda <srinivas.eeda@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2/dlm: cancel the migration or redo deref to recovery master
Date: Sat, 05 Jun 2010 18:48:55 -0700 [thread overview]
Message-ID: <4C0AFE87.6030900@oracle.com> (raw)
In-Reply-To: <20100604053736.GC2415@laptop.us.oracle.com>
On 6/3/2010 10:37 PM, Wengang Wang wrote:
> Srini,
>
> On 10-06-03 19:17, Srinivas Eeda wrote:
>
>>>> Can you please explain the idea of the new flag
>>>> DLM_LOCK_RES_DE_DROP_REF :)
>>>>
>>>> If the idea of the fix is to address the race between purging and
>>>> recovery, I am wondering DLM_LOCK_RES_DROPPING_REF and
>>>> DLM_LOCK_RES_RECOVERING flags may be enough to fix this problem.
>>>> dlm_move_lockres_to_recovery_list moves lockres to resources list
>>>> (which tracks of resources that needs recovery) and sets the flag
>>>> DLM_LOCK_RES_RECOVERING. If we do not call
>>>> dlm_move_lockres_to_recovery_list for the resource which have
>>>> DLM_LOCK_RES_DROPPING_REF set they will not get migrated. In that
>>>> case DLM_LOCK_RES_RECOVERING will not get set and the recovery
>>>> master wouldn't know about this and the lockres that is in the
>>>> middle of purging will get purged.
>>>>
>>>> For the lockres that got moved to resource list they will get
>>>> migrated. In that case lockres has DLM_LOCK_RES_RECOVERING.flag set.
>>>> So dlm_purge_list should consider this as being used and should
>>>> defer purging. the lockres will get recovered and the new owner will
>>>> be set and the flag DLM_LOCK_RES_RECOVERING. will get removed.
>>>> dlm_purge_list can now go ahead and purge this lockres.
>>>>
>>>>
>>> I am following your idea. Addtion to your idea is that we also notice
>>> that we shouldn't send the DEREF request to the recovery master if we
>>> don't migrate the lockres to the recovery master(otherwise, another
>>> BUG() is triggered). DLM_LOCK_RES_DE_DROP_REF is for that purpose.
>>> When
>>> we ignore migrating a lockres, we set this state.
>>>
>>>
>> The case we don't migrate the lockres is only when it's dropping the
>> reference right(when DLM_LOCK_RES_DROPPING_REF is set). In that case we
>> just unhash and free the lockres.
>>
>
> How do you determine whether it's in "that case" in code? I determine that by
> checking the DLM_LOCK_RES_DE_DROP_REF state.
>
If DLM_LOCK_RES_DROPPING_REF is not set for the lockres, then it can get
migrated(even if it's on the purge list).
> regards,
> wengang.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20100605/c543099c/attachment.html
next prev parent reply other threads:[~2010-06-06 1:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-04 1:06 [Ocfs2-devel] [PATCH] ocfs2/dlm: cancel the migration or redo deref to recovery master Srinivas Eeda
2010-06-04 1:43 ` Wengang Wang
2010-06-04 2:17 ` Srinivas Eeda
2010-06-04 5:37 ` Wengang Wang
2010-06-06 1:48 ` Srinivas Eeda [this message]
2010-06-08 12:49 ` Wengang Wang
-- strict thread matches above, loose matches on Subject: below --
2010-05-25 4:54 [Ocfs2-devel] [PATCH 1/1] ocfs2/dlm: resend deref to new master if recovery occures Srinivas Eeda
2010-06-03 16:37 ` [Ocfs2-devel] [PATCH] ocfs2/dlm: cancel the migration or redo deref to recovery master Wengang Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C0AFE87.6030900@oracle.com \
--to=srinivas.eeda@oracle.com \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.