Subject: Re: PANIC - Error
To: Matt McRae <>
From: David Brownlee <>
List: tech-kern
Date: 04/09/1999 10:57:28
	(Note - I don't know how much I can help here with a fix, but
	 I should be able to explain what the message means)

	Well - it comes from a DIAGNOSTIC section in

	The comment for getblk() states:
 * Get a block of requested size that is associated with
 * a given vnode and block offset. If it is found in the
 * block cache, mark it as having been found, make it busy
 * and return it. Otherwise, return an empty block of the
 * correct size. It is up to the caller to insure that the
 * cached blocks be of the correct size.

	The panic itself is:

                        if (ISSET(bp->b_flags, B_DONE|B_DELWRI) &&
                            bp->b_bcount < size)
                        panic("getblk: block size invariant failed");

	B_DELWRI and B_DONE are defined in sys/sys/buf.h

#define   B_DONE          0x00000200      /* I/O completed. */
#define   B_DELWRI        0x00000080      /* Delay I/O until buffer reused. */

	'size' is the requested size passed into getblk(), and 'bp'
	is the block that has been located by getblk() to fufill the

	It looks like getblk() 'found' a matching block (presumably
	already in use), but that block was smaller than the caller

	OK, that covers 'what'. My guess is the next issue is 'why',
	closely follwed by 'how (to fix)'.

	If this happens on install, I'd suggest trying a 1.4_ALPHA
	install set.

	If this is on a running system you should probably submit
	a PR detailing exactly when it happens :)


             -=-  Sue me, screw me, walk right through me  -=-

On Fri, 9 Apr 1999, Matt McRae wrote:

> I am running a Compaq Prosignia 200 300mhz 168mb RAM
> 4 - 9gb Seagate baracuda HDD's (external)
> 2 - adaptec SCSI 2 2940 cards
> NetBSD 1.3.3 IX86
> Received the Following error:
> PANIC: getblk : block size invariant failed
> Can someone please tell me what this means
> Thank you
> Matt McRae
> Technical Support Engineer
> MIS Inc.