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

Wengang Wang wen.gang.wang at oracle.com
Wed Jan 6 18:10:06 PST 2010


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



More information about the Ocfs2-devel mailing list