All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: set OCFS2_LOCK_BLOCKED properly
Date: Thu, 7 Jan 2010 10:10:06 +0800	[thread overview]
Message-ID: <20100107021006.GA3270@laptop.oracle.com> (raw)
In-Reply-To: <20100107010319.GZ11402@wotan.suse.de>

Hi Mark,

sorry that I have no test case and it's not from a bug.
I found it when reading code.

actually I found it as a side product while I was working on
freeze/thaw. and the main bug/problem is described in my email titled 
"ocfs2: fix __ocfs2_cluster_lock() dead lock".

regards,
wengang.
On 10-01-06 17:03, Mark Fasheh wrote:
> On Tue, Jan 05, 2010 at 09:50:33AM -0800, Sunil Mushran wrote:
> > woah... this looks like a good catch.
> > 
> > Mark?
> 
> Yeah, looks like it fixes an error. Keep in mind that the bast function can
> be called multiple times, and sometimes when we're in the middle of a
> downconvert (or shortly after one). The "set BLOCKED always" code looks like
> it was trying to insure we never miss a contended lock, but it could be that
> we marked some needlessly.
> 
> 
> > Wengang Wang wrote:
> > > for most cases ocfs2_generic_handle_bast() return 1 meaning that some down-
> > > converting work should be done. but when it return 0, the OCFS2_LOCK_BLOCKED is
> > > set inproperly.
> > > OCFS2_LOCK_BLOCKED is cleared in a down-convertion(dc) is done. if no dc is needed
> > > any more(done by another lock request queued before this one), OCFS2_LOCK_BLOCKED
> > > stays there unexpectly.
> > >
> > > the fix is that setting that flag when dc(s) is really needed.
> 
> Wengang,
> 
> Can you point to a test case or bug # describing the downside of not having
> this patch :)
> 
> Thanks,
> 	--Mark
> 
> --
> Mark Fasheh

  parent reply	other threads:[~2010-01-07  2:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05 17:05 [Ocfs2-devel] [PATCH] ocfs2: set OCFS2_LOCK_BLOCKED properly Wengang Wang
2010-01-05 17:50 ` Sunil Mushran
2010-01-07  1:03   ` Mark Fasheh
2010-01-07  1:46     ` Joel Becker
2010-01-07  2:10     ` Wengang Wang [this message]
2010-01-07  2:50       ` Mark Fasheh

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=20100107021006.GA3270@laptop.oracle.com \
    --to=wen.gang.wang@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.