From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] o2dlm: check lockres validity in createlock
Date: Thu, 12 May 2011 19:35:38 -0700 [thread overview]
Message-ID: <4DCC98FA.2060000@oracle.com> (raw)
In-Reply-To: <20110512085705.GA19435@laptop.jp.oracle.com>
On 05/12/2011 01:57 AM, Wengang Wang wrote:
> On 11-05-11 12:06, Sunil Mushran wrote:
>> Oh a remote master. So ignore my previous reply.
>>
>> Yes, I can see the race. But the fix below lets the purge to continue
>> and handles it afterwards. A better approach (and more efficient)
>> would be to remove the lockres from the purge list itself.
>>
>> So the race window is between the first block in dlm_get_lock_resource()
>> and dlm_lock_remote().
>>
>> See dlm->inflight_locks. Currently we use this when lockres is locally
>> mastered. Maybe we could use the same for locally mastered too.
> Sunil,
>
> So the only purpose of inflight_locks is to prevent the lockres from
> being purged, right?
>
> I think only removing the lockres from the purge list is enough.
>
> If we hack on inflight_locks, we don't need to remove the lockres from purge list,
> right?
Yes. But you have to be careful. inflight_locks currently is used
to prevent a race in locally mastered resources. I think we can
use it for remotely mastered too.
prev parent reply other threads:[~2011-05-13 2:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-11 11:47 [Ocfs2-devel] [PATCH] o2dlm: check lockres validity in createlock Wengang Wang
2011-05-11 4:52 ` Wengang Wang
2011-05-11 15:38 ` Sunil Mushran
2011-05-11 19:06 ` Sunil Mushran
2011-05-12 8:57 ` Wengang Wang
2011-05-13 2:35 ` Sunil Mushran [this message]
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=4DCC98FA.2060000@oracle.com \
--to=sunil.mushran@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.