bin/67467: df -m and -g incorrect with negative avail

David Andersen dga at lcs.mit.edu
Tue Jun 1 15:40:14 PDT 2004


>Number:         67467
>Category:       bin
>Synopsis:       df -m and -g incorrect with negative avail
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 01 15:40:07 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     David Andersen
>Release:        FreeBSD 5.2.1-RELEASE i386
>Organization:
MIT
>Environment:
System: FreeBSD sheep.lcs.mit.edu 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Mon Feb 23 20:45:55 GMT 2004 root at wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386

>Description:
	df using the -m or -g flags appears to be using an unsigned
quantity to track the amount of available disk space.  This should
be a signed quantity, as available disk space can be negative.  The
-k flag handles negative disk space properly:

503 sheep:~> df -k /ron
Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
/dev/ar0s1e 315131888 303691232 -13769892   105%    /ron

502 sheep:~> df -g /ron
Filesystem  1G-blocks Used          Avail Capacity  Mounted on
/dev/ar0s1e       300  289 70368744177650   105%    /ron

>How-To-Repeat:
	Fill a disk over 100%, and run df.
>Fix:

   Sorry, don't have the time to fix right now, may append
   a fix later.

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list