From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 2/2] ocfs2/dlm: Migrate lockres with no locks if it has a reference
Date: Tue, 23 Nov 2010 16:40:44 -0800 [thread overview]
Message-ID: <4CEC5F0C.9040001@oracle.com> (raw)
In-Reply-To: <20101122081737.GC3326@laptop.jp.oracle.com>
On 11/22/2010 12:17 AM, Wengang Wang wrote:
> I think we can consider MIGRATING as BUSY(DLM_FORWARD) and the creating thread
> should retry in case the owner has changed after the migration.
>
> code it as something like this:
>
> static enum dlm_status dlmlock_master(struct dlm_ctxt *dlm, ...
> {
> ...
> spin_lock(&res->spinlock);
> __dlm_wait_on_lockres(res);
> if (unlikely(res->owner != dlm->node_num)) {
> spin_unlock(&res->spinlock);
> return DLM_FORWARD;
> }
> ...
> }
>
> And if it's from a handler path, just return the DLM_FORWARD; Otherwise
> retry in dlmlock(), (goto retry_lock).
>
> The above should be taken care in my patch "check lockres owner in handler path",
> not for only handler path but also the "local create" path. But seems I
> missed it.
Is this related to the bug we were discussing yesterday? If so, then
the flush_workqueue() is a better solution, IMO.
next prev parent reply other threads:[~2010-11-24 0:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-19 23:06 [Ocfs2-devel] [PATCH 1/2] ocfs2/dlm: Cleanup mlogs in dlmthread.c, dlmast.c and dlmdomain.c Sunil Mushran
2010-11-19 23:06 ` [Ocfs2-devel] [PATCH 2/2] ocfs2/dlm: Migrate lockres with no locks if it has a reference Sunil Mushran
2010-11-21 19:57 ` Joel Becker
2010-11-24 0:22 ` Sunil Mushran
2010-11-22 8:17 ` Wengang Wang
2010-11-22 8:23 ` Wengang Wang
2010-11-24 0:40 ` Sunil Mushran [this message]
2010-11-24 2:17 ` Wengang Wang
2010-12-10 1:44 ` Joel Becker
2010-12-16 8:51 ` [Ocfs2-devel] [PATCH 1/2] ocfs2/dlm: Cleanup mlogs in dlmthread.c, dlmast.c and dlmdomain.c Joel Becker
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=4CEC5F0C.9040001@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.