From: Sunil Mushran <sunil.mushran@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: Plugs race between the dc thread and an unlock ast message
Date: Fri, 05 Feb 2010 10:39:47 -0800 [thread overview]
Message-ID: <4B6C65F3.8000805@oracle.com> (raw)
In-Reply-To: <20100205060148.GA3416@mail.oracle.com>
Joel Becker wrote:
> Why cancel convert? Why not an actual unlock. That's what I
> thought you meant when you proposed the patch. After all, David's bug
> was at DLM_LOCK_IV, not NL.
> Cancel isn't in play here. Cancel only happens on the dc
> thread, and the dc thread has gotten past BUSY. So the lock isn't busy
> anymore. It does downconvert_worker in an unlocked state. When it
> comes back to recheck, another thread can't have done a cancel.
> That's why I asked about unlink. Imagine the dc thread is
> handling a bast while the unlink thread has gotten to clear_inode.
> Could ocfs2_drop_lock() be racing the downconvert?
Yes. I forgot the level was IV. So the full fix would be to ensure
the level is <= NL in the block below. ??
/*
* How can we block and yet be@NL? We were trying to upconvert
* from NL and got canceled. The code comes back here, and now
* we notice and clear BLOCKING.
*/
if (lockres->l_level == DLM_LOCK_NL) {
BUG_ON(lockres->l_ex_holders || lockres->l_ro_holders);
lockres->l_blocking = DLM_LOCK_NL;
lockres_clear_flags(lockres, OCFS2_LOCK_BLOCKED);
spin_unlock_irqrestore(&lockres->l_lock, flags);
goto leave;
}
next prev parent reply other threads:[~2010-02-05 18:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-03 18:16 [Ocfs2-devel] [PATCH] ocfs2: Plugs race between the dc thread and an unlock ast message Sunil Mushran
2010-02-04 10:27 ` Wengang Wang
2010-02-04 19:36 ` Sunil Mushran
2010-02-05 6:01 ` Joel Becker
2010-02-05 18:39 ` Sunil Mushran [this message]
2010-02-05 19:33 ` Mark Fasheh
2010-02-05 23:37 ` Sunil Mushran
2010-02-09 20:55 ` David Teigland
2010-02-09 21:49 ` Sunil Mushran
2010-02-05 16:24 ` David Teigland
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=4B6C65F3.8000805@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.