Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-06 Thread Qu Wenruo
At 12/06/2016 08:44 PM, Goldwyn Rodrigues wrote: On 12/05/2016 09:08 PM, Qu Wenruo wrote: At 12/06/2016 10:51 AM, Goldwyn Rodrigues wrote: On 12/05/2016 08:03 PM, Qu Wenruo wrote: BTW, the DISABLE_BACKTRACE branch seems quite different from backtrace one. #define BUG_ON(c)

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-06 Thread Goldwyn Rodrigues
On 12/05/2016 09:08 PM, Qu Wenruo wrote: > > > At 12/06/2016 10:51 AM, Goldwyn Rodrigues wrote: >> >> >> On 12/05/2016 08:03 PM, Qu Wenruo wrote: >>> BTW, the DISABLE_BACKTRACE branch seems quite different from >>> backtrace one. >>> >>> #define BUG_ON(c) assert_trace(#c, __FILE__, __func__,

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-05 Thread Qu Wenruo
At 12/06/2016 10:51 AM, Goldwyn Rodrigues wrote: On 12/05/2016 08:03 PM, Qu Wenruo wrote: BTW, the DISABLE_BACKTRACE branch seems quite different from backtrace one. #define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, (long)(c)) #define WARN_ON(c) warning_trace(#c, __FILE__,

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-05 Thread Goldwyn Rodrigues
On 12/05/2016 08:03 PM, Qu Wenruo wrote: > BTW, the DISABLE_BACKTRACE branch seems quite different from backtrace one. > > #define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, (long)(c)) > #define WARN_ON(c) warning_trace(#c, __FILE__, __func__, __LINE__, > (long)(c)) > #define

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-05 Thread Qu Wenruo
BTW, the DISABLE_BACKTRACE branch seems quite different from backtrace one. #define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, (long)(c)) #define WARN_ON(c) warning_trace(#c, __FILE__, __func__, __LINE__, (long)(c)) #define ASSERT(c) assert_trace(#c, __FILE__, __func__, __LINE__,

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-05 Thread Goldwyn Rodrigues
Hi Qu, Yes, the assert for ifdef BTRFS_DIABLE_BACKTRACE is not correct. The condition should not have a not(!). Thanks for reporting. On 12/05/2016 01:10 AM, Qu Wenruo wrote: > Hi, Goldwyn and David, > > This patch seems to cause btrfs test case 023 to fail. > > Bisect leads me to this patch.

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-12-04 Thread Qu Wenruo
Hi, Goldwyn and David, This patch seems to cause btrfs test case 023 to fail. Bisect leads me to this patch. $ ./btrfs check ~/quota_balance_loop_backref.raw.restored Checking filesystem on /home/adam/quota_balance_loop_backref.raw.restored UUID: c33c5ce3-3ad9-4320-9201-c337c04e0051 checking

Re: [PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-11-30 Thread David Sterba
On Tue, Nov 29, 2016 at 10:24:52AM -0600, Goldwyn Rodrigues wrote: > From: Goldwyn Rodrigues > > The values passed to BUG_ON/WARN_ON are negated(!) and printed, which > results in printing the value zero for each bug/warning. For example: > volumes.c:988: btrfs_alloc_chunk:

[PATCH 1/2] btrfs-progs: Correct value printed by assertions/BUG_ON/WARN_ON

2016-11-29 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues The values passed to BUG_ON/WARN_ON are negated(!) and printed, which results in printing the value zero for each bug/warning. For example: volumes.c:988: btrfs_alloc_chunk: Assertion `ret` failed, value 0 This is not useful. Instead changed to print