Subject: Re: panic: getblk: block size invariant failed
To: Tad Hunt <email@example.com>
From: Jaromir Dolecek <firstname.lastname@example.org>
Date: 11/23/2001 22:06:33
Tad Hunt wrote:
> " ... It is up to the caller to insure that the cached
> blocks be of the correct size."
> If this is true, wouldn't that imply the diagnostic check is bogus?
No, the diagnostic check is ~right, it's not bogus :)
> When the panic occurs, bp->b_count is 2048, and size is 8192, if
> that makes any difference.
The problem here (AFAIK) is that buffer cache can't coalesce several
buffers into single provided buffer, so the caller with 8K buffer
would only get first 2K from buffer cache. This _might_ cause
problems later on. That's why the diagnostic check is there, to
ensure all callers DTRT.
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-= Those who would give up liberty for a little temporary safety deserve =-
-= neither liberty nor safety, and will lose both. -- Benjamin Franklin =-