freebsd-dev/sys/fs
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
..
autofs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
cd9660 fs/cd9660: add header include guards 2023-03-30 19:20:54 -04:00
cuse cuse(3): Cosmetic change about testing boolean values. 2022-10-04 13:51:06 +02:00
deadfs deadfs: consistently return EOPNOTSUPP for fplookup vops 2023-04-06 15:20:41 +00:00
devfs sys/fs: do not report blocks allocated for synthetic file systems 2023-04-25 09:59:15 +02:00
ext2fs ext2fs: extract crc16 into sys/crc16.h 2023-04-24 12:41:52 +03:00
fdescfs sys/fs: do not report blocks allocated for synthetic file systems 2023-04-25 09:59:15 +02:00
fifofs fifofs: ansify 2023-02-07 23:18:51 +00:00
fuse fuse: Remove set but unused cr_gid variable. 2023-03-31 10:57:13 -07:00
mntfs vfs: add the concept of vnode state transitions 2022-12-26 17:35:12 +00:00
msdosfs fs/msdosfs: Fix potential panic and size calculations 2023-04-25 09:58:29 +02:00
nfs nfscl: Fix support for doing Null RPCs 2023-04-07 12:57:26 -07:00
nfsclient nfscl: Make coverity happy 2023-03-28 17:08:45 -07:00
nfsserver nfsd: Add support for the SP4_MACH_CRED case in ExchangeID 2023-04-07 12:49:23 -07:00
nullfs nullfs: ansify 2023-02-07 23:22:27 +00:00
procfs procfs: Sync a documentation comment with the code. 2023-04-10 17:58:46 +00:00
pseudofs sys/fs: do not report blocks allocated for synthetic file systems 2023-04-25 09:59:15 +02:00
smbfs smbfs: ansify 2023-02-07 23:35:11 +00:00
tarfs tarfs: Use the existing CTLFLAG_RWTUN flag definition 2023-04-12 12:20:38 +08:00
tmpfs tmpfs: add missing vop_fplookup ops to tmpfs_fifoop_entries 2023-04-18 18:06:30 +00:00
udf udf: Remove set but unused variable from udf_getattr. 2023-04-10 10:31:45 -07:00
unionfs unionfs_mkdir(): handle dvp reclamation 2023-04-17 20:31:40 -05:00