Re: [PATCH 3/3] xfs_repair: rebuild block mappings from rmapbt data

Darrick J. Wong
2024-03-14T23:56:08Z

On Wed, Mar 13, 2024 at 06:59:54PM -0700, Christoph Hellwig wrote:
> > +#define min_t(type, x, y) ( ((type)(x)) > ((type)(y)) ? ((type)(y)) : ((type)(x)) )
>
> Should this really be a hidden in a .c file in repair vs in a common
> header where we can use it everywhere?

Eh, yeah, I'll move it to libfrog/util.h. I'll even use the one that's
in libxfs_priv.h.

#define min_t(type,x,y) \
({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })

--D

> Otherwise looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>