commit 40100248f3d3d2ec2c7fe0d5c4fe6cfb94cd832e Author: Tomohiro Kusumi <kusumi.tomoh...@gmail.com> Date: Wed May 25 15:11:13 2016 +0900
sys/vfs/hammer: Don't store negative free/avail for statfs/statvfs f_bfree and f_bavail (these two equal on HAMMER) are likely to be negative when the filesystem usage has reached its limit or almost reaches limit. There is no point in having negative values by using internally reserved size (means not physically finalized with actual data), so force 0 instead of -. Note that this doesn't fix ENOSPC issues. -- before this commit # df -T /HAMMER Filesystem Type 1K-blocks Used Avail Capacity Mounted on TEST hammer 116359168 116363168 -4000 100% /HAMMER -- with this commit # df -T /HAMMER Filesystem Type 1K-blocks Used Avail Capacity Mounted on TEST hammer 116359168 116359168 0 100% /HAMMER Summary of changes: sys/vfs/hammer/hammer_vfsops.c | 4 ++++ 1 file changed, 4 insertions(+) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/40100248f3d3d2ec2c7fe0d5c4fe6cfb94cd832e -- DragonFly BSD source repository