freebsd-dev/sys
Rick Macklem 03c81af249 nfscl: Fix generation of va_fsid for a tree of NFSv4 server file systems
Pre-r318997 the code looked like:
if (vp->v_mount->mnt_stat.f_fsid.val[0] != (uint32_t)np->n_vattr.na_filesid[0])
         vap->va_fsid = (uint32_t)np->n_vattr.na_filesid[0];
Doing this assignment got lost by r318997 and, as such, NFSv4 mounts
of servers with trees of file systems on the server is broken, due to duplicate
fileno values for the same st_dev/va_fsid.

Although I could have re-introduced the assignment, since the value of
na_filesid[0] is not guaranteed to be unique across the server file systems,
I felt it was better to always do the hash for na_filesid[0,1].
Since dev_t (st_dev/va_fsid) is now 64bits, I switched to a 64bit hash.

There is a slight chance of a hash conflict where 2 different na_filesid
values map to same va_fsid, which will be documented in the BUGS
section of the man page for mount_nfs(8).  Using a table to keep track
of mappings to catch conflicts would not easily scale to 10,000+ server file
systems and, when the conflict occurs, it only results in fts(3) reporting
a "directory cycle" under certain circumstances.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D30660
2021-06-07 13:48:25 -07:00
..
amd64 linuxolator: Add compat.linux.setid_allowed knob 2021-06-06 21:43:00 +03:00
arm arm: Remove last_fault_code 2021-06-06 16:44:47 -04:00
arm64 arm64: Fix pmap_copy()'s handling of 2MB mappings 2021-06-06 16:44:46 -04:00
bsm
cam cam_sim: style: sort includes 2021-05-25 09:56:56 -06:00
cddl fbt: Remove some handling for multiple CTF containers 2021-04-02 17:49:13 -04:00
compat LinuxKPI: add pr_err_once 2021-06-07 10:31:48 -04:00
conf kmod.mk: Allow extra objects to be specified in modules 2021-06-02 10:39:58 -06:00
contrib ngatm: Handle errors from uni_msg_extend() 2021-06-06 16:44:47 -04:00
crypto ossl: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
ddb fix style nit: space after if 2021-05-05 15:26:09 -06:00
dev iwn: adjust EEPROM read timeout for Intel 4965AGN M2 2021-06-06 16:44:47 -04:00
dts arm64: rockchip: Add some DTSO to disable sd/mmc 2021-05-13 18:15:31 +02:00
fs nfscl: Fix generation of va_fsid for a tree of NFSv4 server file systems 2021-06-07 13:48:25 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gconcat: Add new lock to allow modifications to the disk list in preparation for online append 2021-06-02 15:59:25 -06:00
gnu
i386 linuxolator: Add compat.linux.setid_allowed knob 2021-06-06 21:43:00 +03:00
isa Remove more remnants of sio(4) 2021-04-07 14:33:02 -04:00
kern Fix handling of D_GIANTOK 2021-06-07 16:45:50 -04:00
kgssapi
libkern Use '.arch_extension crc' in the arm64 crc32 code 2021-05-06 07:42:35 +00:00
mips [mips/broadcom] set sysctl "hw.model" by SoC ChipCommon ID 2021-05-28 23:35:37 +03:00
modules dtb: rockchip: Add NanoPC-T4 to the build. 2021-06-05 15:19:26 +00:00
net Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
net80211 net80211/LinuxKPI: add more radiotap definitions 2021-06-05 16:21:49 +00:00
netgraph Make LINT NOINET and NOIP kernel builds warning free. 2021-06-06 14:03:06 +00:00
netinet tcp: A better fix for the previously attempted fix of the ack-war issue with tcp. 2021-06-04 05:26:43 -04:00
netinet6 Enter the net epoch before calling ip6_setpktopts 2021-06-04 13:18:11 -04:00
netipsec Add missing sockaddr length and family validation to various protocols 2021-05-03 13:35:19 -04:00
netpfil dummynet: free(NULL, M_DUMMYNET); is safe 2021-06-03 09:02:53 +02:00
netsmb netsmb: Avoid a read-after-free in smb_t2_request_int() 2021-05-26 10:45:40 -04:00
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed OFED: migrate LinuxKPI net_device/ifnet macros into ofed 2021-05-27 12:26:01 +00:00
opencrypto cryptosoft: Use crypto_cursor_segment(). 2021-05-25 16:59:19 -07:00
powerpc powerpc64le/pmap: Fix superpage promotions 2021-06-05 21:49:42 -05:00
riscv riscv: Rename pmap_fault_fixup() to pmap_fault() 2021-06-06 16:44:46 -04:00
rpc nfsd: Fix the failure return for non-fh NFSv4 operations 2021-06-02 15:28:07 -07:00
security tcp_input/syncache: acquire only read lock on PCB for SYN,!ACK packets 2021-04-12 08:25:31 -07:00
sys Suppress D_NEEDGIANT warnings for some drivers 2021-06-06 16:44:46 -04:00
teken
tests Revise FIB lookups per second benchmarking routines. 2021-05-05 12:28:17 +02:00
tools makesyscalls.lua: improve generated file style(9) compliance 2021-05-13 13:59:25 -04:00
ufs ffs: Correct the input size check in sysctl_ffs_fsck() 2021-05-31 18:59:18 -04:00
vm vm: add another pager private flag 2021-05-15 20:47:29 +00:00
x86 Disable x2APIC for SandyBridge laptops with Samsung BIOS 2021-06-03 22:47:31 +03:00
xdr
xen x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
Makefile