From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] dlm: fix a race in lockres mastery
Date: Mon, 22 Mar 2010 18:20:32 -0700 [thread overview]
Message-ID: <4BA81760.7030902@oracle.com> (raw)
In-Reply-To: <20100323011523.GA12279@mail.oracle.com>
yes, your wording is better. and yes, dlm->spinlock is the
top level lock.
Joel Becker wrote:
> On Mon, Mar 22, 2010 at 05:41:43PM -0700, Sunil Mushran wrote:
>
>> =================================================================
>> In o2dlm, the resource master maintains a (ref)map of all nodes that
>> are informed of the fact that that node masters that resource. This is
>> done to prevent the master from purging the resource before the other
>> node can create a lock.
>>
>> This patch plugs a race between the mastery handler thread and the
>> mastery thread that allows the node to discover the master of the
>> resource without informing the master node.
>>
>> Fixes ossbz#1012
>> http://oss.oracle.com/bugzilla/show_bug.cgi?id=1012
>> =================================================================
>>
>> Add my sob and change the comment to the above.
>> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
>>
>
> The comment above makes even less sense to me than Srini's.
> Hiss, while a little confusing to read, made me feel like I would get it
> if I just looked at the code. This text is...mumbo-jumbo. "the
> resource master maintains a map of all nodes that are informed of the
> fact that that node masters that resource" indeed.
> Let me see if I can parse it:
>
> ------------------------------------------
> In o2dlm, the master of a lock resource keeps a map of all interested
> nodes. This prevents the master from purging the resource before an
> interested node can create a lock.
>
> A race between the mastery thread and the mastery handler allowed an
> interested node to discover the who the master is without informing the
> master directly. This is easily fixed by holding the dlm spinlock a
> little longer in the mastery handler.
> ------------------------------------------
>
> How's that?
> I also had a question about the patch. It is safe to hold the
> dlm spinlock across all the other spinlocks, right? I believe that the
> dlm spinlock is toplevel, so I'm pretty sure it is, but I wanted to
> verify.
>
> Joel
>
>
next prev parent reply other threads:[~2010-03-23 1:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 23:50 [Ocfs2-devel] [PATCH 1/1] dlm: fix a race in lockres mastery Srinivas Eeda
2010-03-23 0:41 ` Sunil Mushran
2010-03-23 1:15 ` Joel Becker
2010-03-23 1:20 ` Sunil Mushran [this message]
2010-03-23 1:47 ` Joel Becker
2010-03-23 2:21 ` SRINIVAS EEDA
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=4BA81760.7030902@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.