All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xue jiufei <xuejiufei@huawei.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list
Date: Wed, 15 Aug 2012 14:28:35 +0800	[thread overview]
Message-ID: <502B4193.5040608@huawei.com> (raw)
In-Reply-To: <CAEeiSHVJc6pnTcQ8MrLBvQ+GhZ=5P6uG-sBg0VcvK0LWxBjpuA@mail.gmail.com>

? 2012/8/15 0:03, Sunil Mushran ??:
> On Mon, Aug 13, 2012 at 7:03 PM, Xue jiufei <xuejiufei at huawei.com <mailto:xuejiufei@huawei.com>> wrote:
> 
>       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 at huawei.com <mailto: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) {
>     --
> 
> 
> Looks reasonable. 
> 
> Just wanted to confirm. Did this BUG_ON in dlmrecovery,c get tripped?
> 
> 1903                                 /* otherwise, the node is sending its
> 1904                                  * most recent valid lvb info */
> 1905                                 BUG_ON(ml->type != LKM_EXMODE &&
> 1906                                        ml->type != LKM_PRMODE);
> 

Sorry, I haven't described it clearly.

We trigger the BUG() in dlmrecovery.c:1923. 

Lockres had copyed lvb from previous valid locks and then meet with another lock with the EX level.

1907				if (!dlm_lvb_is_empty(res->lvb) &&
1908 				    (ml->type == LKM_EXMODE ||
1909 				     memcmp(res->lvb, mres->lvb, DLM_LVB_LEN))) {
						......
1923 					BUG();
1924				}

  reply	other threads:[~2012-08-15  6:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-14  2:03 [Ocfs2-devel] [PATCH] ocfs2: skip locks in the blocked list Xue jiufei
2012-08-14 16:03 ` Sunil Mushran
2012-08-15  6:28   ` Xue jiufei [this message]
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=502B4193.5040608@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.