Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Feb 2009 00:11:59 -0800
From:      perryh@pluto.rain.com
To:        dnelson@allantgroup.com
Cc:        john@zog.net, freebsd-questions@freebsd.org
Subject:   Re: NFSv2 Wrong FS Size
Message-ID:  <498a9f4f.MMsTyUVGLtZWmJhj%perryh@pluto.rain.com>
In-Reply-To: <20090204151450.GQ75802@dan.emsphone.com>
References:  <158E6ABD-6BCF-4222-AD59-9B43FE6832D5@zog.net> <ECF42325-F49A-4C4F-9C1C-F5B00A78BC73@zog.net> <20090203215326.GN75802@dan.emsphone.com> <49894cf9.J2VbLPqLSoDq7yay%perryh@pluto.rain.com> <20090204151450.GQ75802@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > you could rebuild "df" to print its numbers as unsigned
> > > instead of signed.  Just watch out if your local filesystems
> > > start eating into their 8% reserve, since they'll start
> > > reporting huge values.
> > 
> > Or patch "df" to print local filesystem sizes as signed -- so
> > that the reserve reporting still works -- and NFS as unsigned
> > to match the spec.
>
> That works as long as you don't NFS-mount other FreeBSD systems
> with overfull drives :)

Looking at this a little more closely, it appears that the "struct
statfs" returned by statfs(2) and friends tells the whole story,
using 64-bit values most of which are defined as unsigned.  (Only
f_bavail and f_ffree -- the number of blocks and inodes available to
non-superusers -- are defined as signed.)  The code that converts
from the 32-bit NFSv2 to the 64-bit "struct statfs" values seems
more likely to be somewhere in NFS than in df(1).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?498a9f4f.MMsTyUVGLtZWmJhj%perryh>