freebsd-nq/sys
Rick Macklem 24af0fcdfc nfscl: Make nfscl_getlayout() acquire the correct pNFS layout
Without this patch, if a pNFS read layout has already been acquired
for a file, writes would be redirected to the Metadata Server (MDS),
because nfscl_getlayout() would not acquire a read/write layout for
the file.  This happened because there was no "mode" argument to
nfscl_getlayout() to indicate whether reading or writing was being done.
Since doing I/O through the Metadata Server is not encouraged for some
pNFS servers, it is preferable to get a read/write layout for writes
instead of redirecting the write to the MDS.

This patch adds a access mode argument to nfscl_getlayout() and
nfsrpc_getlayout(), so that nfscl_getlayout() knows to acquire a read/write
layout for writing, even if a read layout has already been acquired.
This patch only affects NFSv4.1/4.2 client behaviour when pNFS ("pnfs" mount
option against a server that supports pNFS) is in use.

This problem was detected during a recent NFSv4 interoperability
testing event held by the IETF working group.

MFC after:	2 week
2021-10-13 15:48:54 -07:00
..
amd64 Enable PPS_SYNC on amd64, arm64 and armv7 2021-10-10 22:34:40 +03:00
arm Enable PPS_SYNC on amd64, arm64 and armv7 2021-10-10 22:34:40 +03:00
arm64 Stop reading the arm64 domain when it's known 2021-10-12 13:16:00 +01:00
bsm
cam cam(4): Limit search for disks in SES enclosure by single bus 2021-10-05 15:01:16 -04:00
cddl Allow ddb and dtrace use the DMAP region on arm64 2021-10-01 11:27:33 +01:00
compat vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
conf Restore PPS_SYNC in NOTES 2021-10-12 23:10:35 +03:00
contrib vfs: remove thread argument from VOP_STAT 2021-10-11 13:22:32 +00:00
crypto crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes. 2021-10-06 14:08:49 -07:00
ddb
dev nvme: Restore hotplug warning 2021-10-12 14:26:54 -06:00
dts
fs nfscl: Make nfscl_getlayout() acquire the correct pNFS layout 2021-10-13 15:48:54 -07:00
gdb
geom geom_label: Add more validation for NTFS volume tasting 2021-10-04 18:15:06 -04:00
gnu
i386 i386: move signal delivery code to exec_machdep.c 2021-10-08 03:20:42 +03:00
isa
kern ktls: Ensure FIFO encryption order for TLS 1.0. 2021-10-13 12:30:15 -07:00
kgssapi
libkern
mips minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -03:00
modules modules: felix: Remove etherswitch_if.c from Makefile 2021-10-01 11:24:08 +02:00
net Remove in_ifaddr_lock acquisiton to access in_ifaddrhead. 2021-10-13 10:04:46 -07:00
net80211 net80211: fix build for 526370fb85 2021-10-08 11:21:44 +00:00
netgraph bluetooth: complete removal of ng_h4 2021-09-29 20:00:02 -06:00
netinet Remove in_ifaddr_lock acquisiton to access in_ifaddrhead. 2021-10-13 10:04:46 -07:00
netinet6 sctp: Tighten up locking around sctp_aloc_assoc() 2021-09-11 10:15:21 -04:00
netipsec ipsec: fix typo part2 2021-09-27 07:46:56 +02:00
netpfil pf: Introduce pf_nvbool() 2021-10-13 12:01:09 +02:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed socket: De-duplicate SBLOCKWAIT() definitions 2021-09-14 09:01:32 -04:00
opencrypto stand: fix build after recent opencrypto changes 2021-10-06 20:23:44 -05:00
powerpc Restore PPS_SYNC in NOTES 2021-10-12 23:10:35 +03:00
riscv Restore PPS_SYNC in NOTES 2021-10-12 23:10:35 +03:00
rpc rpc: Convert an SOLISTENING check to an assertion 2021-09-17 14:19:05 -04:00
security
sys ktls: Ensure FIFO encryption order for TLS 1.0. 2021-10-13 12:30:15 -07:00
teken
tests
tools makesyscalls: sprinkle some assert() on standard function calls 2021-09-24 20:55:56 -05:00
ufs vfs: remove cn_thread 2021-10-11 13:21:47 +00:00
vm forward declare struct thread 2021-10-11 12:59:39 -06:00
x86 apic: initialize lapic_paddr statically 2021-10-06 05:52:56 +03:00
xdr
xen
Makefile