[Ocfs2-tools-devel] [PATCH 2/6] extent_map: Add a parameter for ocfs2_extent_map_get_blocks.

Joel Becker Joel.Becker at oracle.com
Mon Sep 24 15:17:10 PDT 2007


On Mon, Sep 24, 2007 at 02:47:31PM -0700, Mark Fasheh wrote:
> On Mon, Sep 24, 2007 at 02:24:07PM -0700, Joel Becker wrote:
> > On Mon, Sep 24, 2007 at 05:19:53PM +0800, Tao Ma wrote:
> > > extent_map: Add a parameter for ocfs2_extent_map_get_blocks.
> > >  	    So the extent flags can be returned.
> > 
> > 	Wouldn't it be better to have a separate "get flags" API?  That
> > is, you'd ask for the extent out of the map, but then you can also ask
> > for the flags based on the extent data?
> 
> I think a seperate flags API for getting 8 bits of flag information which
> are core to ocfs2_extent_rec is overkill. This is exactly the type of
> information you'd want when looking up an extent.

	A fair argument.  I wasn't so much desperate to have an
additional API.  I was just trying to figure out how to keep from
growing an already large function prototype, especially since almost all
the call sites appear to be NULL for this argument.  Maybe there isn't a
better way, and maybe later patches change those NULLs.  I haven't
gotten that far ;-)

Joel

-- 

"If the human brain were so simple we could understand it, we would
 be so simple that we could not."
	- W. A. Clouston

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



More information about the Ocfs2-tools-devel mailing list