[PATCH 1/3] xfs: cleanup bmap extent state macros
Christoph Hellwig
hch at infradead.org
Mon Dec 14 16:48:19 CST 2009
On Mon, Dec 14, 2009 at 03:29:45PM -0600, Alex Elder wrote:
> Christoph Hellwig wrote:
> > Cleanup the extent state macros in the bmap code to use one common set of
> > flags that we can pass to the tracing code later and remove a lot of the
> > macro obsfucation.
>
> This looks good. Although this was motivated by making this code fit into
> the tracing model better, I prefer the way the result looks anyway.
>
> Your changes are nice, straightforward mapping from the old to the
> new. In a couple of spots it might be slightly clearer to assign
> a mask temporary, e.g. replace something like:
> if ((state & (BMAP_LEFT_CONTIG | BMAP_LEFT_FILLING |
> BMAP_RIGHT_FILLING)) !=
> (BMAP_LEFT_CONTIG | BMAP_LEFT_FILLING |
> BMAP_RIGHT_FILLING))
> with
> mask = BMAP_LEFT_CONTIG | BMAP_LEFT_FILLING | BMAP_RIGHT_FILLING;
> if (state & mask != mask)
> Nevertheless, I'm glad you didn't make changes like that because
> it was easier to review this way. Something to consider for later.
Yeah, pondered it, but it didn't look totally clean with the mask
either. It's a all bit borderline.
More information about the xfs
mailing list