freebsd-nq/sys/fs
Rick Macklem 2d90ef4714 nfsd: Fix Verify for attributes like FilesAvail
When the Verify operation calls nfsv4_loadattr(), it provides
the "struct statfs" information that can be used for doing a
compare for FilesAvail, FilesFree, FilesTotal, SpaceAvail,
SpaceFree and SpaceTotal.  However, the code erroneously
used the "struct nfsstatfs *" argument that is NULL.
This patch fixes these cases to use the correct argument
structure.  For the case of FilesAvail, the code in
nfsv4_fillattr() was factored out into a separate function
called nfsv4_filesavail(), so that it can be called from
nfsv4_loadattr() as well as nfsv4_fillattr().

In fact, most of the code in nfsv4_filesavail() is old
OpenBSD code that does not build/run on FreeBSD, but I
left it in place, in case it is of some use someday.

I am not aware of any extant NFSv4 client that does Verify
on these attributes.

Reported by:	rtm@lcs.mit.edu
Tested by:	rtm@lcs.mit.edu
PR:	260176
MFC after:	2 weeks
2021-12-04 14:38:55 -08:00
..
autofs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
cd9660 vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
cuse Fix for loading cuse.ko via rc.d . Make sure we declare the cuse(3) 2020-10-23 08:44:53 +00:00
deadfs vn_open(): If the vnode is reclaimed during open(2), do not return error. 2021-02-12 03:02:20 +02:00
devfs vfs: add vop_stdadd_writecount_nomsync 2021-11-26 12:06:08 +00:00
ext2fs ext2: Check for e2fs_first_dblock in ext2_compute_sb_data() 2021-11-29 09:53:45 -08:00
fdescfs fdescfs: plug a set-but-not-unused var 2021-11-24 21:25:24 +00:00
fifofs fifos: delegate unhandled kqueue filters to underlying filesystem 2021-10-12 02:43:07 -05:00
fuse fusefs: update atime on reads when using cached attributes 2021-11-28 18:53:31 -07:00
mntfs mntfs: lock mntfs pseudo devfs vnode properly 2021-11-13 01:00:41 +02:00
msdosfs vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
nfs nfsd: Fix Verify for attributes like FilesAvail 2021-12-04 14:38:55 -08:00
nfsclient nfscl: Disable use of the LookupOpen RPC 2021-11-27 15:34:45 -08:00
nfsserver Revert "wpa: Import wpa_supplicant/hostapd commit 14ab4a816" 2021-12-02 14:45:04 -08:00
nullfs vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
procfs procfs_doprocfile(): simplify 2021-11-04 06:13:47 +02:00
pseudofs vfs: add vop_stdadd_writecount_nomsync 2021-11-26 12:06:08 +00:00
smbfs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
tmpfs vfs: replace the MNTK_TEXT_REFS flag with VIRF_TEXT_REF 2021-11-27 23:07:25 +00:00
udf vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00
unionfs vfs: remove the unused thread argument from NDINIT* 2021-11-25 22:50:42 +00:00