Subject: disk statistics
To: None <tech-kern@NetBSD.ORG>
From: John M Vinopal <banshee@gabriella.abattoir.com>
List: tech-kern
Date: 08/09/1996 15:30:44
It was brought up by a user that byte xfer stats are wrong.  ie: you xfer a
meg from disk and the stats don't show a meg transfered.

I believe this centers around the curious use of b_resid to contain both
/usr/include/sys/buf.h: long    b_resid;                /* Remaining I/O. */
and
/usr/include/sys/buf.h:#define  b_cylinder b_resid              /* Cylinder number for disksort(). */


The common return value to disk_unbusy() is
'b_count - b_resid', but b_resid seems (in the case of i386 fd.c, others?)
to contain the cylinder #, thereby returning an incorrect value.