On Sun, Nov 05, 2017 at 09:16:28AM -0800, Conrad Meyer wrote:
> On Sun, Nov 5, 2017 at 5:06 AM, Konstantin Belousov <[email protected]> 
> wrote:
> > On Sat, Nov 04, 2017 at 12:04:56PM -0700, Conrad Meyer wrote:
> >> This is a functional change, because MPASS (via KASSERT) is only
> >> enabled on DEBUG kernels.  Ideally we would have a kind of ASSERT that
> >> worked on NODEBUG kernels.
> > Why would we need such thing ?
> >
> > Our conventions are clear: consistency checks are normally done with
> > KASSERT() and enabled for DEBUG (INVARIANTS or harder) configurations.
> > We only leave explicit panics in the production kernels when there
> > continuation of operations is worse then abort, e.g. when UFS detects
> > the metadata corruption.
> 
> An always-on assert construct would be precisely for the latter
> scenario.  Instead, we litter the tree with "if (!invariant) {
> panic(); }."
We do

#ifdef INVARIANTS
if (!condition) panic();
#endif

I do not understand what do you mean by 'instead'.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to