The pseudo file systems (devfs, fdescfs, procfs, etc.) report total and available blocks and inodes despite being synthetic with no underlying storage device to which those values could be applied.
The current code of these file systems tends to report a fixed number of blocks but no free blocks, and in the case of procfs, libprocfs, linsysfs also no free inodes.
This can be irritating in the "df" output, since 100% of the resources seem to be in use, but it can also create warnings in monitoring tools used for capacity management.
This patch makes these file systems return the same value for the total and free parameters, leading to 0% in use being displayed by "df".
Since there is no resource that can be exhausted, this is a sensible result.
Details
Details
Apply patch and verify that the misleading 100% consumed values have become 0% in the output of df.
For devfs and fdescfs a value of 1 KB is returned for total and free blocks.
For procfs etc. a value of 1 page (i.e. 4 KB for most current architectures) is returned for both values.
In each case the number of total and used inodes returned is fixed at 0, except for fdescfs which continues to display a huge number of available file descriptor table entries and the number of used file descriptors respectively.
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable