View | Details | Raw Unified | Return to bug 226494 | Differences between
and this patch

Collapse All | Expand All

(-)fs/nfs/nfs.h (+1 lines)
Lines 329-334 struct nfsreferral { Link Here
329
#define	LCL_RECLAIMCOMPLETE	0x00010000
329
#define	LCL_RECLAIMCOMPLETE	0x00010000
330
#define	LCL_NFSV41		0x00020000
330
#define	LCL_NFSV41		0x00020000
331
#define	LCL_DONEBINDCONN	0x00040000
331
#define	LCL_DONEBINDCONN	0x00040000
332
#define	LCL_RECLAIMONEFS	0x00080000
332
333
333
#define	LCL_GSS		LCL_KERBV	/* Or of all mechs */
334
#define	LCL_GSS		LCL_KERBV	/* Or of all mechs */
334
335
(-)fs/nfs/nfs_var.h (-1 / +1 lines)
Lines 141-147 void nfsrv_nfsuserddelport(void); Link Here
141
void nfsrv_throwawayallstate(NFSPROC_T *);
141
void nfsrv_throwawayallstate(NFSPROC_T *);
142
int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *,
142
int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *,
143
    uint32_t *, int, uint32_t *, NFSPROC_T *);
143
    uint32_t *, int, uint32_t *, NFSPROC_T *);
144
int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
144
int nfsrv_checkreclaimcomplete(struct nfsrv_descript *, int);
145
void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
145
void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
146
void nfsrv_freeallbackchannel_xprts(void);
146
void nfsrv_freeallbackchannel_xprts(void);
147
int nfsrv_layoutcommit(struct nfsrv_descript *, vnode_t, int, int, uint64_t,
147
int nfsrv_layoutcommit(struct nfsrv_descript *, vnode_t, int, int, uint64_t,
(-)fs/nfsserver/nfs_nfsdserv.c (-4 / +13 lines)
Lines 4229-4245 nfsrvd_reclaimcomplete(struct nfsrv_desc Link Here
4229
    __unused vnode_t vp, __unused NFSPROC_T *p, __unused struct nfsexstuff *exp)
4229
    __unused vnode_t vp, __unused NFSPROC_T *p, __unused struct nfsexstuff *exp)
4230
{
4230
{
4231
	uint32_t *tl;
4231
	uint32_t *tl;
4232
	int error = 0;
4232
	int error = 0, onefs;
4233
4233
4234
	if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) {
4234
	if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) {
4235
		nd->nd_repstat = NFSERR_WRONGSEC;
4235
		nd->nd_repstat = NFSERR_WRONGSEC;
4236
		goto nfsmout;
4236
		goto nfsmout;
4237
	}
4237
	}
4238
	NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
4238
	NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED);
4239
	/*
4240
	 * I believe that a ReclaimComplete with rca_one_fs == TRUE is only
4241
	 * to be used after a file system has been transferred to a different
4242
	 * file server.  However, RFC5661 is somewhat vague w.r.t. this and
4243
	 * the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs
4244
	 * == TRUE and one with ReclaimComplete with rca_one_fs == FALSE.
4245
	 * Therefore, just ignore the rca_one_fs == TRUE operation and return
4246
	 * NFS_OK without doing anything.
4247
	 */
4248
	onefs = 0;
4239
	if (*tl == newnfs_true)
4249
	if (*tl == newnfs_true)
4240
		nd->nd_repstat = NFSERR_NOTSUPP;
4250
		onefs = 1;
4241
	else
4251
	nd->nd_repstat = nfsrv_checkreclaimcomplete(nd, onefs);
4242
		nd->nd_repstat = nfsrv_checkreclaimcomplete(nd);
4243
nfsmout:
4252
nfsmout:
4244
	NFSEXITCODE2(error, nd);
4253
	NFSEXITCODE2(error, nd);
4245
	return (error);
4254
	return (error);
(-)fs/nfsserver/nfs_nfsdstate.c (-3 / +5 lines)
Lines 6064-6070 nfsrv_checksequence(struct nfsrv_descrip Link Here
6064
 * Check/set reclaim complete for this session/clientid.
6064
 * Check/set reclaim complete for this session/clientid.
6065
 */
6065
 */
6066
int
6066
int
6067
nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd)
6067
nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd, int onefs)
6068
{
6068
{
6069
	struct nfsdsession *sep;
6069
	struct nfsdsession *sep;
6070
	struct nfssessionhash *shp;
6070
	struct nfssessionhash *shp;
Lines 6080-6087 nfsrv_checkreclaimcomplete(struct nfsrv_ Link Here
6080
		return (NFSERR_BADSESSION);
6080
		return (NFSERR_BADSESSION);
6081
	}
6081
	}
6082
6082
6083
	/* Check to see if reclaim complete has already happened. */
6083
	if (onefs != 0)
6084
	if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0)
6084
		sep->sess_clp->lc_flags |= LCL_RECLAIMONEFS;
6085
		/* Check to see if reclaim complete has already happened. */
6086
	else if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0)
6085
		error = NFSERR_COMPLETEALREADY;
6087
		error = NFSERR_COMPLETEALREADY;
6086
	else {
6088
	else {
6087
		sep->sess_clp->lc_flags |= LCL_RECLAIMCOMPLETE;
6089
		sep->sess_clp->lc_flags |= LCL_RECLAIMCOMPLETE;

Return to bug 226494