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
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.
On Mon, Aug 26, 2013 at 04:56:06PM -0400, Josef Bacik wrote:
+#ifdef BTRFS_ASSERT
+
+static inline void assfail(char *expr, char *file, int lin)
typo: lin instead of line
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to
On Mon, Aug 26, 2013 at 02:53:26PM -0700, Zach Brown wrote:
With this we can
go through and convert any BUG_ON()'s that we have to catch actual
programming
mistakes to the new ASSERT() and then fix everybody else to return errors.
I like the sound of that!
--- a/fs/btrfs/ctree.h
On 8/27/13 9:47 AM, Josef Bacik wrote:
On Mon, Aug 26, 2013 at 02:53:26PM -0700, Zach Brown wrote:
With this we can
go through and convert any BUG_ON()'s that we have to catch actual
programming
mistakes to the new ASSERT() and then fix everybody else to return errors.
I like the sound of
On 8/26/13 4:56 PM, Josef Bacik wrote:
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
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, Josef Bacik wrote:
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
On 8/27/13 4:56 PM, Josef Bacik wrote:
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, Josef Bacik wrote:
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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 8/27/13 4:07 PM, Jeff Mahoney wrote:
On 8/27/13 4:56 PM, Josef Bacik wrote:
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, Josef Bacik wrote:
One of the complaints we get a lot is how many BUG_ON()'s we have.
On 8/27/13 5:21 PM, Eric Sandeen wrote:
On 8/27/13 4:07 PM, Jeff Mahoney wrote:
On 8/27/13 4:56 PM, Josef Bacik wrote:
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, Josef Bacik wrote:
One of the complaints we get a lot is how many BUG_ON()'s we have. So to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 8/27/13 4:25 PM, Jeff Mahoney wrote:
On 8/27/13 5:21 PM, Eric Sandeen wrote:
On 8/27/13 4:07 PM, Jeff Mahoney wrote:
On 8/27/13 4:56 PM, Josef Bacik wrote:
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, Josef
On 8/27/13 5:28 PM, Eric Sandeen wrote:
On 8/27/13 4:25 PM, Jeff Mahoney wrote:
On 8/27/13 5:21 PM, Eric Sandeen wrote:
On 8/27/13 4:07 PM, Jeff Mahoney wrote:
On 8/27/13 4:56 PM, Josef Bacik wrote:
On Tue, Aug 27, 2013 at 03:28:24PM -0400, Jeff Mahoney wrote:
On 8/26/13 4:56 PM, 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.
On 8/26/13 3:56 PM, Josef Bacik wrote:
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
With this we can
go through and convert any BUG_ON()'s that we have to catch actual programming
mistakes to the new ASSERT() and then fix everybody else to return errors.
I like the sound of that!
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -3814,6 +3814,22 @@ void btrfs_printk(const
#ifdef BTRFS_ASSERT
#define btrfs_assert(cond) BUG_ON(!(cond))
#else
#define btrfs_assert(cond) do { if (cond) ; } while (0)
#endif
I think the only downside is that the BUG_ON() won't print the
conditional that failed, IIRC.
Sure, if you wanted to go the
16 matches
Mail list logo