[Bug 270053] msdosfs: statfs tracks total file nodes, but not free file nodes
Date: Wed, 08 Mar 2023 23:04:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=270053
Bug ID: 270053
Summary: msdosfs: statfs tracks total file nodes, but not free
file nodes
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: woodsb02@freebsd.org
The msdosfs_vfsops.c code is using the statfs(2) f_files limit variable to
represent the FAT root directory entities limit, but is not using the
corresponding f_ffree available variable to represent the current number of
root directory entities. This leads to the df(1) output incorrectly implying
that the number of root directory entities is at capacity.
To avoid this confusion, I think the msdosfs_vfsops.c should either set both
the f_files and f_ffree statfs variables so that df(1) correctly reports
%iused, or should set them both to zero so that df(1) shows %iused as "-".
Example output from FreeBSD 13.1-RELEASE on a FAT16 file system:
$ df -i /boot/efi
Filesystem 512-blocks Used Avail Capacity iused ifree %iused Mounted on
/dev/nvd0p1 532352 3680 528672 1% 512 0 100% /boot/efi
--
You are receiving this mail because:
You are the assignee for the bug.