From: Xue jiufei <xuejiufei@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list
Date: Tue, 14 Aug 2012 10:03:17 +0800 [thread overview]
Message-ID: <5029B1E5.4030509@huawei.com> (raw)
A parallel umount on 4 nodes triggered a bug in dlm_process_recovery_date(). Here?s the situation:
Receiving MIG_LOCKRES message, A node processes the locks in migratable lockres. It copys lvb from migratable lockres when processing the first valid lock.
If there is a lock in the blocked list with the EX level, it triggers the BUG. Since valid lvbs are set when locks are granted with EX or PR levels, locks in
the blocked list cannot have valid lvbs. Therefore I think we should skip the locks in the blocked list.
Signed-off-by: Xuejiufei <xuejiufei@huawei.com>
---
fs/ocfs2/dlm/dlmrecovery.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index 01ebfd0..15d81ad 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1887,6 +1887,13 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm,
if (ml->type == LKM_NLMODE)
goto skip_lvb;
+
+ /*
+ * If the lock is in the blocked list it can't have a valid lvb,
+ * so skip it
+ */
+ if (ml->list == DLM_BLOCKED_LIST)
+ goto skip_lvb;
if (!dlm_lvb_is_empty(mres->lvb)) {
if (lksb->flags & DLM_LKSB_PUT_LVB) {
--
1.7.9.7
next reply other threads:[~2012-08-14 2:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 2:03 Xue jiufei [this message]
2012-08-14 16:03 ` [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list Sunil Mushran
2012-08-15 6:28 ` Xue jiufei
2012-08-15 16:11 ` Sunil Mushran
2012-08-15 18:43 ` [Ocfs2-devel] ocfs2 + quota next oops - Mayby help with diagnose problem Marek Królikowski
2012-08-15 6:41 ` [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list 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=5029B1E5.4030509@huawei.com \
--to=xuejiufei@huawei.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.