Subject: Re: Panics in #define DIAGNOSTIC code ?
To: Heiko W.Rupp <hwr@pilhuhn.de>
From: Todd Vierling <tv@pobox.com>
List: tech-kern
Date: 05/10/1999 16:30:41
On Sat, 1 May 1999, Heiko W.Rupp wrote:

: looking at kern/7321, I saw that the panic mentioned 
: is produced as result of 
: 
: #ifdef DIAGNOSTIC
:                         if (ISSET(bp->b_flags, B_DONE|B_DELWRI) &&
:                             bp->b_bcount < size)
:                                 panic("getblk: block size invariant failed");
: #endif
: (kern/vfs_bio.c)
: 
: While it is a good idea, to have some invariant checking now and then,
: I don't see the point to panic the system here.

: - the check is important as it could lead to inconsistent data
: otherwise, then it shoudl always be executed and not only when
: DIAGNOSTIC is defined.

DIAGNOSTIC is explicitly defined as `...kernel sanity checks...' which can
be _stripped out_ of a running kernel at the admin's deiscretion in the name
of speed.  This is not the only panic within a DIAGNOSTIC block.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)