Re: [PATCH, RFC] libxfs: check the size of on-disk data structures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 04, 2023 at 11:53:06AM -0800, Darrick J. Wong wrote:
> >  #define XFS_CHECK_VALUE(value, expected) \
> > -	BUILD_BUG_ON_MSG((value) != (expected), \
> > +	static_assert((value) == (expected), \
> 
> HAH LOL that's much better.  I think I even see that kernel code is
> using it now, and wonder why BUG_BUILD_ON still exists.

Yup:

hch@brick:~/work/linux$ git-grep static_assert | wc -l
840
hch@brick:~/work/linux$ git-grep BUILD_BUG_ON_MSG | wc -l
92

> Going back for another cup of koolaid now,

Haha.

> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx>

Thanks.  I was just getting ready to send out a series with this and
the xfs_ondisk.h move.





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux