Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Nov 2017 09:16:28 -0800
From:      Conrad Meyer <cem@freebsd.org>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r325386 - head/sys/kern
Message-ID:  <CAG6CVpV3SfV8VuNeMJEuN%2BMSu3424mK=HO_-YW9vRt9HEdcJZQ@mail.gmail.com>
In-Reply-To: <20171105130607.GA2566@kib.kiev.ua>
References:  <201711041049.vA4AnZUE096709@repo.freebsd.org> <CAG6CVpUaXSX26Bc839kn96EXnUjtGyQ3_eNJPhsRB%2Bv6G6gH1Q@mail.gmail.com> <20171105130607.GA2566@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Nov 5, 2017 at 5:06 AM, Konstantin Belousov <kostikbel@gmail.com> 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(); }."

Best,
Conrad



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG6CVpV3SfV8VuNeMJEuN%2BMSu3424mK=HO_-YW9vRt9HEdcJZQ>