[Ocfs2-devel] [PATCH 03/10] ocfs2: Make ocfs2_extent_tree get/put instead of alloc.

Joel Becker Joel.Becker at oracle.com
Thu Aug 21 16:27:43 PDT 2008


On Thu, Aug 21, 2008 at 04:11:00PM -0700, Mark Fasheh wrote:
> On Thu, Aug 21, 2008 at 04:05:33PM -0700, Joel Becker wrote:
> > > Can you add a check, down here probably, that we got an 'et_type' value
> > > passed in which is valid? If not, then we might continue with on-the-stack
> > > versions of et_root_el, etc. This won't fail as nice as the kzalloc would
> > > have before.
> > 
> > 	The final patch removes the et_type completely.  If you want, I
> > can have the intermediate patches do stricter et_type checking (I think
> > a later one BUG()s).
> 
> Yep, just caught that one. We don't have to be super strict in the early
> patches so long as it gets caught by the end of the series.

	You know, if we move eo_remove_check() back to
eo_sanity_check(), we could do those at the end of __get_extent_tree().
Add in IS_XATTR_VALUE_ROOT() etc, and it's a clean place to check.  It
probably doesn't catch disk corruption (Most of these bhs are already
pre-checked), but it will catch people passing the wrong kind of bh.

Joel

-- 

"The cynics are right nine times out of ten."  
        - H. L. Mencken

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