FreeBSD Bugzilla – Attachment 195222 Details for
Bug 226494
ESX NFSv4.1 client fails when ReclaimComplete for one FS fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Just return NFS_OK for ReclaimComplete with rca_one_fs TRUE
reclaimcom4.patch (text/plain), 3.14 KB, created by
Rick Macklem
on 2018-07-17 22:48:00 UTC
(
hide
)
Description:
Just return NFS_OK for ReclaimComplete with rca_one_fs TRUE
Filename:
MIME Type:
Creator:
Rick Macklem
Created:
2018-07-17 22:48:00 UTC
Size:
3.14 KB
patch
obsolete
>--- fs/nfs/nfs.h.orig 2018-07-17 18:34:15.403369000 -0400 >+++ fs/nfs/nfs.h 2018-07-17 18:35:27.660838000 -0400 >@@ -329,6 +329,7 @@ struct nfsreferral { > #define LCL_RECLAIMCOMPLETE 0x00010000 > #define LCL_NFSV41 0x00020000 > #define LCL_DONEBINDCONN 0x00040000 >+#define LCL_RECLAIMONEFS 0x00080000 > > #define LCL_GSS LCL_KERBV /* Or of all mechs */ > >--- fs/nfs/nfs_var.h.orig 2018-07-17 18:34:34.232775000 -0400 >+++ fs/nfs/nfs_var.h 2018-07-17 18:35:58.646747000 -0400 >@@ -141,7 +141,7 @@ void nfsrv_nfsuserddelport(void); > void nfsrv_throwawayallstate(NFSPROC_T *); > int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, > uint32_t *, int, uint32_t *, NFSPROC_T *); >-int nfsrv_checkreclaimcomplete(struct nfsrv_descript *); >+int nfsrv_checkreclaimcomplete(struct nfsrv_descript *, int); > void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); > void nfsrv_freeallbackchannel_xprts(void); > int nfsrv_layoutcommit(struct nfsrv_descript *, vnode_t, int, int, uint64_t, >--- fs/nfsserver/nfs_nfsdserv.c.orig 2018-07-17 18:33:37.398482000 -0400 >+++ fs/nfsserver/nfs_nfsdserv.c 2018-07-17 18:36:43.087406000 -0400 >@@ -4229,17 +4229,26 @@ nfsrvd_reclaimcomplete(struct nfsrv_desc > __unused vnode_t vp, __unused NFSPROC_T *p, __unused struct nfsexstuff *exp) > { > uint32_t *tl; >- int error = 0; >+ int error = 0, onefs; > > if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { > nd->nd_repstat = NFSERR_WRONGSEC; > goto nfsmout; > } > NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); >+ /* >+ * I believe that a ReclaimComplete with rca_one_fs == TRUE is only >+ * to be used after a file system has been transferred to a different >+ * file server. However, RFC5661 is somewhat vague w.r.t. this and >+ * the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs >+ * == TRUE and one with ReclaimComplete with rca_one_fs == FALSE. >+ * Therefore, just ignore the rca_one_fs == TRUE operation and return >+ * NFS_OK without doing anything. >+ */ >+ onefs = 0; > if (*tl == newnfs_true) >- nd->nd_repstat = NFSERR_NOTSUPP; >- else >- nd->nd_repstat = nfsrv_checkreclaimcomplete(nd); >+ onefs = 1; >+ nd->nd_repstat = nfsrv_checkreclaimcomplete(nd, onefs); > nfsmout: > NFSEXITCODE2(error, nd); > return (error); >--- fs/nfsserver/nfs_nfsdstate.c.orig 2018-07-17 18:33:57.385253000 -0400 >+++ fs/nfsserver/nfs_nfsdstate.c 2018-07-17 18:37:06.528710000 -0400 >@@ -6064,7 +6064,7 @@ nfsrv_checksequence(struct nfsrv_descrip > * Check/set reclaim complete for this session/clientid. > */ > int >-nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd) >+nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd, int onefs) > { > struct nfsdsession *sep; > struct nfssessionhash *shp; >@@ -6080,8 +6080,10 @@ nfsrv_checkreclaimcomplete(struct nfsrv_ > return (NFSERR_BADSESSION); > } > >- /* Check to see if reclaim complete has already happened. */ >- if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0) >+ if (onefs != 0) >+ sep->sess_clp->lc_flags |= LCL_RECLAIMONEFS; >+ /* Check to see if reclaim complete has already happened. */ >+ else if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0) > error = NFSERR_COMPLETEALREADY; > else { > sep->sess_clp->lc_flags |= LCL_RECLAIMCOMPLETE;
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 226494
:
191365
|
195165
| 195222