Re: [Ext2-devel] [RFC] [PATCH] Clean up fs.h union for ext2

Andreas Dilger
2001-12-29T21:02:15Z

On Dec 29, 2001 10:04 -0600, Oliver Xymoron wrote:
> On Thu, 27 Dec 2001, Andreas Dilger wrote:
> > Minor nit: this is already done for the ext3 code, but it looks like:
> >
> > #define EXT3_I (&((inode)->u.ext3_i))
> >
> > We already have the EXT3_SB, so I thought I would be consistent with it:
> >
> > #define EXT3_SB (&((sb)->u.ext3_sb))
> >
> > Do people like the inline version better? Either way, I would like to make
> > the ext2 and ext3 codes more similar, rather than less.
>
> The ext3 macros are rather revolting, simply because they assume the
> variable name. A parameterized macro might be the best compromise:
>
> #define EXT2_I(i) (&(i->u.ext2_inode_info))

My mistake, the Ext3 macros _do_ take an inode/sb parameter. It's not that
I'm a huge fan of macros over inline functions, it's just that I would like
to have a consensus about how it should be done so that it is consistent
between ext2 and ext3.

Cheers, Andreas
--
Andreas Dilger