aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nfsserver/nfs_nfsdserv.c
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2018-07-16 21:32:50 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2018-07-16 21:32:50 +0000
commit5d54f186bbb55ccfc11379525cef8be59f33449f (patch)
tree913c0a459d67d12de0453941c907aae6be2b574c /sys/fs/nfsserver/nfs_nfsdserv.c
parentc1176e63e821c69576ac8de3f1be9c04db419fb2 (diff)
downloadsrc-5d54f186bbb55ccfc11379525cef8be59f33449f.tar.gz
src-5d54f186bbb55ccfc11379525cef8be59f33449f.zip
Modify the reasons for not issuing a delegation in the NFSv4.1 server.
The ESXi NFSv4.1 client will generate warning messages when the reason for not issuing a delegation is two. Two refers to a resource limit and I do not see why it would be considered invalid. However it probably was not the best choice of reason for not issuing a delegation. This patch changes the reasons used to ones that the ESXi client doesn't complain about. This change does not affect the FreeBSD client and does not appear to affect behaviour of the Linux NFSv4.1 client. RFC5661 defines these "reasons" but does not give any guidance w.r.t. which ones are more appropriate to return to a client. Tested by: andreas.nagy@frequentis.com PR: 226650 MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=336357
Diffstat (limited to 'sys/fs/nfsserver/nfs_nfsdserv.c')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdserv.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index 6a478ea012de..75393d457bcd 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -3095,7 +3095,13 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram,
*tl = txdr_unsigned(NFSV4OPEN_DELEGATEWRITE);
else if (retext != 0) {
*tl = txdr_unsigned(NFSV4OPEN_DELEGATENONEEXT);
- if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) {
+ if ((rflags & NFSV4OPEN_WDNOTWANTED) != 0) {
+ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(NFSV4OPEN_NOTWANTED);
+ } else if ((rflags & NFSV4OPEN_WDSUPPFTYPE) != 0) {
+ NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED);
+ *tl = txdr_unsigned(NFSV4OPEN_NOTSUPPFTYPE);
+ } else if ((rflags & NFSV4OPEN_WDCONTENTION) != 0) {
NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED);
*tl++ = txdr_unsigned(NFSV4OPEN_CONTENTION);
*tl = newnfs_false;