ID:               40633
 User updated by:  adam-phpbugs at adam dot gs
 Reported By:      adam-phpbugs at adam dot gs
-Status:           Feedback
+Status:           Open
 Bug Type:         Filesystem function related
 Operating System: *BSD (at least)
 PHP Version:      5.2.1
 New Comment:

This was FreeBSD

if you look at the FreeBSD manpage for tunefs(8), this is 
the intended behaviour.

http://www.freebsd.org/cgi/man.cgi?
query=tunefs&apropos=0&sektion=0&manpath=FreeBSD+6.2-
RELEASE&format=html


Basically, in FreeBSD (under UFS2 at least) avaliable space 
is calculated as total minus used minus reserved. A small % 
(8 by default) is reserved.

So, this is not really a bug, but actually an intended 
feature.


Previous Comments:
------------------------------------------------------------------------

[2007-02-26 09:33:41] [EMAIL PROTECTED]

What kind of BSD is that and don't you think that negative free space
is a BSD bug?

------------------------------------------------------------------------

[2007-02-26 00:55:02] adam-phpbugs at adam dot gs

Description:
------------
on a filesystem with a negative amount of free space (this 
can happen on at least FreeBSD) disk_free_space returns 
unreasonable results.

-=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:55]=-
[EMAIL PROTECTED] php -r 'print disk_free_space(".")."\n";'
3.77789318629E+22
-=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:57]=-
[EMAIL PROTECTED] df -h .
Filesystem    Size    Used   Avail Capacity  Mounted on
/dev/ad7      289G    289G    -23G   109%    /some/path
-=[/some/path]=- -=[Sun Feb 25]=- -=[19:51:58]=-
[EMAIL PROTECTED] df .
Filesystem 1K-blocks      Used     Avail Capacity  Mounted 
on
/dev/ad7   302732078 302699550 -24186038   109%    /some/
path


Reproduce code:
---------------
php -r 'print disk_free_space(".")."\n";'

Expected result:
----------------
-24186038

Actual result:
--------------
3.77789318629E+22


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=40633&edit=1

Reply via email to