Re: BUG_ON() in workingset_node_shadows_dec() triggers
From: Linus Torvalds
Date: Wed Oct 05 2016 - 22:12:27 EST
On Wed, Oct 5, 2016 at 6:59 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
>
> In XFS, we use ASSERT() (could be XFS_BUG_ON() for all
> that the name matters) but we only define that to BUG_ON if
> CONFIG_XFS_DEBUG=y.
>
> For "production debug" kernels we have CONFIG_XFS_WARN=y, which
> turns ASSERT() into WARN_ON(). We get the warnings, but none of the
> crashiness that are desirable in a development context.
Yes. that sounds very much like the right kind of decision.
Forcing crashes can be very useful for the actual developer that is
doing development on the code itself, kind of a "fail fast, fail
hard".
But users (or developers that are developing something _else_ than XFS
;) don't tend to like it.
Linus