[Ocfs2-devel] [PATCH] ocfs2: set OCFS2_LOCK_BLOCKED properly

Joel Becker Joel.Becker at oracle.com
Wed Jan 6 17:46:34 PST 2010


On Wed, Jan 06, 2010 at 05:03:19PM -0800, 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.

	I'm trying to come up with the converse.  That is, why
wouldn't BLOCKED need to be set, or why wouldn't it be set even if
needed.
	If we're not yet blocking (l_blocking == NL), or we need to go
lower, we need to downconvert.  Gotta set BLOCKED if it wasn't set.  If
we're already scheduled to go to level, the downconvert must already be
queued.  It should have set BLOCKED.  If it's already complete, we have
nothing to block.  If we then set BLOCKED, we're in trouble.
	Yeah, this seems safe.  Sorry for blathering about it ;-)

> Can you point to a test case or bug # describing the downside of not having
> this patch :)

	Definitely want to record the failure case.

Joel

-- 

"Not everything that can be counted counts, and not everything
 that counts can be counted."
        - Albert Einstein 

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127



More information about the Ocfs2-devel mailing list