freebsd-dev/sys/fs/fdescfs
Stefan Eßer 88a795e80c sys/fs: do not report blocks allocated for synthetic file systems
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 total blocks but no free blocks, and in the case of procfs,
libprocfs, linsysfs also no free inodes.

This can be irritating in e.g. 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 appears
to be a sensible result.

Reviewed by:	mckusick
Differential Revision:	https://reviews.freebsd.org/D39442
2023-04-25 09:59:15 +02:00
..
fdesc_vfsops.c sys/fs: do not report blocks allocated for synthetic file systems 2023-04-25 09:59:15 +02:00
fdesc_vnops.c fdesc_lookup(): drop fdropped 2023-03-24 19:47:22 +02:00
fdesc.h fdescfs: add an option to return underlying file vnode on lookup 2021-06-04 03:30:12 +03:00