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

Collapse All | Expand All

(-)fs/nfs/nfs_var.h (+1 lines)
Lines 135-140 int nfsrv_checksequence(struct nfsrv_des Link Here
135
    uint32_t *, int, uint32_t *, NFSPROC_T *);
135
    uint32_t *, int, uint32_t *, NFSPROC_T *);
136
int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
136
int nfsrv_checkreclaimcomplete(struct nfsrv_descript *);
137
void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
137
void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **);
138
void nfsrv_freeallbackchannel_xprts(void);
138
139
139
/* nfs_nfsdserv.c */
140
/* nfs_nfsdserv.c */
140
int nfsrvd_access(struct nfsrv_descript *, int,
141
int nfsrvd_access(struct nfsrv_descript *, int,
(-)fs/nfsserver/nfs_nfsdkrpc.c (+1 lines)
Lines 544-549 nfsrvd_init(int terminating) Link Here
544
	if (terminating) {
544
	if (terminating) {
545
		nfsd_master_proc = NULL;
545
		nfsd_master_proc = NULL;
546
		NFSD_UNLOCK();
546
		NFSD_UNLOCK();
547
		nfsrv_freeallbackchannel_xprts();
547
		svcpool_destroy(nfsrvd_pool);
548
		svcpool_destroy(nfsrvd_pool);
548
		nfsrvd_pool = NULL;
549
		nfsrvd_pool = NULL;
549
		NFSD_LOCK();
550
		NFSD_LOCK();
(-)fs/nfsserver/nfs_nfsdstate.c (-3 / +31 lines)
Lines 5784-5797 nfsrv_checksequence(struct nfsrv_descrip Link Here
5784
	 * If this session handles the backchannel, save the nd_xprt for this
5784
	 * If this session handles the backchannel, save the nd_xprt for this
5785
	 * RPC, since this is the one being used.
5785
	 * RPC, since this is the one being used.
5786
	 */
5786
	 */
5787
	if (sep->sess_cbsess.nfsess_xprt != NULL &&
5787
	if (sep->sess_clp->lc_req.nr_client != NULL &&
5788
	    (sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0) {
5788
	    (sep->sess_crflags & NFSV4CRSESS_CONNBACKCHAN) != 0) {
5789
		savxprt = sep->sess_cbsess.nfsess_xprt;
5789
		savxprt = sep->sess_cbsess.nfsess_xprt;
5790
		SVC_ACQUIRE(nd->nd_xprt);
5790
		SVC_ACQUIRE(nd->nd_xprt);
5791
		nd->nd_xprt->xp_p2 = savxprt->xp_p2;
5791
		nd->nd_xprt->xp_p2 =
5792
		    sep->sess_clp->lc_req.nr_client->cl_private;
5792
		nd->nd_xprt->xp_idletimeout = 0;	/* Disable timeout. */
5793
		nd->nd_xprt->xp_idletimeout = 0;	/* Disable timeout. */
5793
		sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
5794
		sep->sess_cbsess.nfsess_xprt = nd->nd_xprt;
5794
		SVC_RELEASE(savxprt);
5795
		if (savxprt != NULL)
5796
			SVC_RELEASE(savxprt);
5795
	}
5797
	}
5796
5798
5797
	*sflagsp = 0;
5799
	*sflagsp = 0;
Lines 6050-6052 nfsv4_getcbsession(struct nfsclient *clp Link Here
6050
	return (0);
6052
	return (0);
6051
}
6053
}
6052
6054
6055
/*
6056
 * Free up all backchannel xprts. This needs to be done when the nfsd threads
6057
 * exit, since those transports will all be going away.
6058
 * This is only called after all the nfsd threads are done performing RPCs,
6059
 * so locking shouldn't be an issue.
6060
 */
6061
APPLESTATIC void
6062
nfsrv_freeallbackchannel_xprts(void)
6063
{
6064
	struct nfsdsession *sep;
6065
	struct nfsclient *clp;
6066
	SVCXPRT *xprt;
6067
	int i;
6068
6069
	for (i = 0; i < nfsrv_clienthashsize; i++) {
6070
		LIST_FOREACH(clp, &nfsclienthash[i], lc_hash) {
6071
			LIST_FOREACH(sep, &clp->lc_session, sess_list) {
6072
				xprt = sep->sess_cbsess.nfsess_xprt;
6073
				sep->sess_cbsess.nfsess_xprt = NULL;
6074
				if (xprt != NULL)
6075
					SVC_RELEASE(xprt);
6076
			}
6077
		}
6078
	}
6079
}
6080

Return to bug 204340