Subject: Re: Vinum almost up and running on NetBSD
To: Greg 'groggy' Lehey <grog@lemis.com>
From: Chuck Silvers <chuq@chuq.com>
List: current-users
Date: 04/21/2003 20:47:55
On Tue, Apr 22, 2003 at 11:24:23AM +0930, Greg 'groggy' Lehey wrote:
> It's simple enough to "fix" this panic: use b_bcount instead of
> b_bufsize. But is that the correct fix? Is it valid to have an
> uninitialized b_bufsize? If so, when, and what use is the field?
the way I understand it, b_bufsize is used by the buffer cache
for tracking how much memory is attached to the buffer, whereas
b_bcount is for two purposes: (1) by the buffer cache to record
how much data in the buffer is actually valid, and (2) as part of
the disk-driver interface to indicate how much data to transfer
when the buffer is read or written. so disk drivers should never
look at b_bufsize, only b_bcount.
-Chuck