Re: [PATCH] Btrfs: add support for asserts V2

2013-08-30 Thread David Sterba
On Thu, Aug 29, 2013 at 02:09:57PM -0400, Josef Bacik wrote: +#define ASSERT(expr) \ + (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) +#else +#define ASSERT(expr) ((void)0) +#endif + +#define btrfs_assert() This is unused and without any ifdef-ed alternatives, should go

[PATCH] Btrfs: add support for asserts V2

2013-08-29 Thread Josef Bacik
One of the complaints we get a lot is how many BUG_ON()'s we have. So to help with this I'm introducing a kconfig option to enable/disable a new ASSERT() mechanism much like what XFS does. This will allow us developers to still get our nice panics but allow users/distros to compile them out.