linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: Qu Wenruo <quwenruo@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3] btrfs-progs: Fix disable backtrace assert error
Date: Thu, 19 Jan 2017 13:08:46 +0100	[thread overview]
Message-ID: <20170119120846.GY12081@suse.cz> (raw)
In-Reply-To: <4a97de85-9dcc-d5ca-3b98-671699d13511@suse.de>

On Wed, Jan 18, 2017 at 09:42:45PM -0600, Goldwyn Rodrigues wrote:
> >>> +#define BUG_ON(c) ASSERT(!(c))
> >>
> >> The problem with this is that you are killing the value printed as a
> >> part of the trace for BUG_ON(). The main reason why commit
> >> 00e769d04c2c83029d6c71 was written. Please be careful with your notting
> >> especially when the values are being printed.
> >>
> > 
> > This is designed.
> > 
> > As ASSERT() is more meaningful than the abused BUG_ON(), I changed it to
> > print correct value for ASSERT() and ignore BUG_ON().
> 
> If ASSERT is meaningful, correct it. But please don't make BUG_ON worse
> and leave it as it is, at least until the time you can remove the
> BUG_ONs or convert it. It should print the correct value of why it did
> bug, or else it will print just 1, which is of no debug value.

Agreed, we want to see the exact value.

      reply	other threads:[~2017-01-19 12:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18  3:04 [PATCH v3] btrfs-progs: Fix disable backtrace assert error Qu Wenruo
2017-01-18 11:38 ` Goldwyn Rodrigues
2017-01-19  0:27   ` Qu Wenruo
2017-01-19  3:42     ` Goldwyn Rodrigues
2017-01-19 12:08       ` David Sterba [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170119120846.GY12081@suse.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.com \
    --cc=rgoldwyn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).