[Ocfs2-devel] [PATCH 1/1] Ocfs2: Add missing ocfs2_journal_acces_*() for couple of funcs in dir.c

Mark Fasheh mfasheh at suse.com
Tue Sep 7 14:18:24 PDT 2010


On Fri, Aug 27, 2010 at 10:46:09AM +0800, Tristan Ye wrote:
> To correctly journal the metadata in ocfs2, it's known for us to call
> ocfs2_journal_access_*() and ocfs2_journal_dirty()to mark buffer dirty,
> they are expected to exist in a pair.
> 
> Whereas several funcs for dx-dirs manipulation were forgeting to call
> appropriate ocfs2_journal_access*() to correctly journal the dirty
> metadata, which may cause a BUG in jbd2, reporting a NULL pointer
> gets ASSERTED in the journal buffer head.
> 
> Currently, we found three functions being hurt in dir.c, all serving
> for dx-dirs:
> 
>     - ocfs2_dx_dir_transfer_leaf()

NAK, this doesn't look to have a problem. Both clusters (new and old) are
journal_accessed previously. Look at ocfs2_dx_dir_rebalance and ocfs2_dx_dir_format_cluster.



>     - ocfs2_remove_block_from_free_list()
>     - ocfs2_recalc_free_list()

Can you show me the stack traces for these please? It kinda looks like you
just added journal_access calls randomly to make sure we cover everything.
Not only does that confuse the code (look at how many functions turned from
returning void to int) but it's redunant in most of the cases.
	--Mark

--
Mark Fasheh



More information about the Ocfs2-devel mailing list