FreeBSD Bugzilla – Attachment 191541 Details for
Bug 226650
ESXi NFSv4.1 client complains that "2" isn't a valid reason for not issuing a delegation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Change the reasons for not issuing delegations to ones that the ESXi client is happy with
wantdeleg.patch (text/plain), 3.43 KB, created by
Rick Macklem
on 2018-03-16 00:46:02 UTC
(
hide
)
Description:
Change the reasons for not issuing delegations to ones that the ESXi client is happy with
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2018-03-16 00:46:02 UTC
Size:
3.43 KB
patch
obsolete
>--- fs/nfsserver/nfs_nfsdserv.c.sav 2018-03-07 20:42:20.347017000 -0500 >+++ fs/nfsserver/nfs_nfsdserv.c 2018-03-08 21:47:45.483151000 -0500 >@@ -2951,7 +2961,13 @@ nfsrvd_open(struct nfsrv_descript *nd, _ > *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; >--- fs/nfsserver/nfs_nfsdstate.c.sav 2018-03-07 21:17:08.050132000 -0500 >+++ fs/nfsserver/nfs_nfsdstate.c 2018-03-08 21:54:10.318383000 -0500 >@@ -3006,7 +3006,13 @@ tryagain: > /* > * This is where we can choose to issue a delegation. > */ >- if (delegate == 0 || writedeleg == 0 || >+ if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) >+ *rflagsp |= NFSV4OPEN_WDNOTWANTED; >+ else if (nfsrv_issuedelegs == 0) >+ *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; >+ else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) >+ *rflagsp |= NFSV4OPEN_WDRESOURCE; >+ else if (delegate == 0 || writedeleg == 0 || > NFSVNO_EXRDONLY(exp) || (readonly != 0 && > nfsrv_writedelegifpos == 0) || > !NFSVNO_DELEGOK(vp) || >@@ -3014,11 +3020,6 @@ tryagain: > (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != > LCL_CALLBACKSON) > *rflagsp |= NFSV4OPEN_WDCONTENTION; >- else if (nfsrv_issuedelegs == 0 || >- NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) >- *rflagsp |= NFSV4OPEN_WDRESOURCE; >- else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) >- *rflagsp |= NFSV4OPEN_WDNOTWANTED; > else { > new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; > new_deleg->ls_stateid.other[0] = delegstateidp->other[0] >@@ -3068,16 +3069,17 @@ tryagain: > /* > * This is where we can choose to issue a delegation. > */ >- if (delegate == 0 || (writedeleg == 0 && readonly == 0) || >- !NFSVNO_DELEGOK(vp) || >+ if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) >+ *rflagsp |= NFSV4OPEN_WDNOTWANTED; >+ else if (nfsrv_issuedelegs == 0) >+ *rflagsp |= NFSV4OPEN_WDSUPPFTYPE; >+ else if (NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) >+ *rflagsp |= NFSV4OPEN_WDRESOURCE; >+ else if (delegate == 0 || (writedeleg == 0 && >+ readonly == 0) || !NFSVNO_DELEGOK(vp) || > (clp->lc_flags & (LCL_CALLBACKSON | LCL_CBDOWN)) != > LCL_CALLBACKSON) > *rflagsp |= NFSV4OPEN_WDCONTENTION; >- else if (nfsrv_issuedelegs == 0 || >- NFSRV_V4DELEGLIMIT(nfsrv_delegatecnt)) >- *rflagsp |= NFSV4OPEN_WDRESOURCE; >- else if ((new_stp->ls_flags & NFSLCK_WANTNODELEG) != 0) >- *rflagsp |= NFSV4OPEN_WDNOTWANTED; > else { > new_deleg->ls_stateid.seqid = delegstateidp->seqid = 1; > new_deleg->ls_stateid.other[0] = delegstateidp->other[0] >--- fs/nfs/nfsproto.h.sav 2018-03-07 21:32:38.706155000 -0500 >+++ fs/nfs/nfsproto.h 2018-03-08 21:47:45.516382000 -0500 >@@ -552,6 +552,7 @@ > #define NFSV4OPEN_WDRESOURCE 0x00080000 > #define NFSV4OPEN_WDCONTENTION 0x00100000 > #define NFSV4OPEN_WDNOTWANTED 0x00200000 >+#define NFSV4OPEN_WDSUPPFTYPE 0x00400000 > > /* > * NFS V4 File Handle types
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226650
: 191541