Date: Fri, 18 Apr 2014 11:39:00 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Sergey Matveychuk <sem@semmy.ru> Cc: hackers@freebsd.org Subject: Re: statfs(2) Message-ID: <20140418163900.GA54186@dan.emsphone.com> In-Reply-To: <53514ED2.2060904@semmy.ru> References: <53514ED2.2060904@semmy.ru>
index | next in thread | previous in thread | raw e-mail
In the last episode (Apr 18), Sergey Matveychuk said:
> Hi.
>
> Tell me please, why f_bfree is unsigned and f_bavail is signed?
>
> struct statfs {
> ...
> uint64_t f_bfree; /* free blocks in filesystem */
> int64_t f_bavail; /* free blocks avail to non-superuser */
> ...
f_bavail may become negative on UFS, due to space reserved to the root user
(minfree in the newfs and tunefs manpages). When the free space becomes
less than minree, f_bavail isn't clamped at zero, but just goes negative.
--
Dan Nelson
dnelson@allantgroup.com
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140418163900.GA54186>
