[Ocfs2-devel] [PATCH 14/15] ocfs2: Read support for directories with inline data

Mark Fasheh mark.fasheh at oracle.com
Thu Sep 20 17:04:54 PDT 2007


On Thu, Sep 20, 2007 at 04:47:40PM -0700, Joel Becker wrote:
> On Wed, Sep 12, 2007 at 01:01:18PM -0700, Mark Fasheh wrote:
> > +static int ocfs2_dir_foreach_blk_id(struct inode *inode,
> > +				    unsigned long *f_version,
> > +				    loff_t *f_pos, void *priv,
> > +				    filldir_t filldir)
> > +{
> 
> 	Isn't this function basically the center of foreach_blk_el()?

It's deceptive. Some parts are similar, but many checks are different or
don't exist in one version over another. The looping is slightly different
too. The extent based code handles readahead, while that doesn't make sense
for inline-data, etc, etc.

> Is there any way to consolidate that?

I actually looked at that for a long time, but decided that it would be best
to just keep them seperate. The extent based code is a total mess, and
introducing subtle changes based on in-inode dirs seemed like it could break
some stuff (in weird ways) which has been working fine for a while now.

I managed to consolidate most of the other dir functions though, which I
was happy about.
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh at oracle.com



More information about the Ocfs2-devel mailing list