Subject: Re: Problem with df(1)
To: Gunnar Helliesen <gunnar@bitcon.no>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-i386
Date: 11/04/1997 19:44:53
On Tue, 4 Nov 1997 18:14:15 +0100 
 Gunnar Helliesen <gunnar@bitcon.no> wrote:

 > Some of you might remember that I reported a problem with df(1) a while
 > back. The problem is that the free space calculations are wrong on large
 > disks:
 > 
 > atlas:~# df /dev/sd2c
 > Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
 > /dev/sd2c    21952751 20433937 -41430858   -97%    /usr/local/ftp/.4

...um, how old is your kernel?  Matt Jacob fixed a bug in the FFS
code that was causing problems like this.  We can now run df(1) on
Very Large file systems and get correct results.

 > My question is: Where are the elements of statfs calculated in the first
 > place? How many places are the numbers passed as signed? Am I even on
 > the right track? ;-)

...yes, you are... they were being calculated incorrectly in the FFS 
code :-)

It _should_ be fixed now...

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                            Home: +1 408 866 1912
NAS: M/S 258-6                                       Work: +1 650 604 0935
Moffett Field, CA 94035                             Pager: +1 415 428 6939