diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2012-12-08 22:52:39 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2012-12-08 22:52:39 +0000 |
commit | c82d89183db93c8a4a4a1db712fa5464d28ff9a3 (patch) | |
tree | 1d0d5926e781fef2471af6865dd51ab8fbdb8620 /sys/fs/nfsclient/nfs_clkrpc.c | |
parent | 98601953890f2c4381eda07f2914bfc1f8b114ec (diff) | |
download | FreeBSD-src-c82d89183db93c8a4a4a1db712fa5464d28ff9a3.zip FreeBSD-src-c82d89183db93c8a4a4a1db712fa5464d28ff9a3.tar.gz |
Move the NFSv4.1 client patches over from projects/nfsv4.1-client
to head. I don't think the NFS client behaviour will change unless
the new "minorversion=1" mount option is used. It includes basic
NFSv4.1 support plus support for pNFS using the Files Layout only.
All problems detecting during an NFSv4.1 Bakeathon testing event
in June 2012 have been resolved in this code and it has been tested
against the NFSv4.1 server available to me.
Although not reviewed, I believe that kib@ has looked at it.
Diffstat (limited to 'sys/fs/nfsclient/nfs_clkrpc.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clkrpc.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/fs/nfsclient/nfs_clkrpc.c b/sys/fs/nfsclient/nfs_clkrpc.c index fceb36d..71889fc 100644 --- a/sys/fs/nfsclient/nfs_clkrpc.c +++ b/sys/fs/nfsclient/nfs_clkrpc.c @@ -45,12 +45,13 @@ __FBSDID("$FreeBSD$"); NFSDLOCKMUTEX; -SVCPOOL *nfscbd_pool; +extern SVCPOOL *nfscbd_pool; static int nfs_cbproc(struct nfsrv_descript *, u_int32_t); extern u_long sb_max_adj; extern int nfs_numnfscbd; +extern int nfscl_debuglevel; /* * NFS client system calls for handling callbacks. @@ -90,6 +91,7 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt) nd.nd_mreq = NULL; nd.nd_cred = NULL; + NFSCL_DEBUG(1, "cbproc=%d\n",nd.nd_procnum); if (nd.nd_procnum != NFSPROC_NULL) { if (!svc_getcred(rqst, &nd.nd_cred, &credflavor)) { svcerr_weakauth(rqst); @@ -133,9 +135,10 @@ nfscb_program(struct svc_req *rqst, SVCXPRT *xprt) svcerr_auth(rqst, nd.nd_repstat & ~NFSERR_AUTHERR); if (nd.nd_mreq != NULL) m_freem(nd.nd_mreq); - } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) { + } else if (!svc_sendreply_mbuf(rqst, nd.nd_mreq)) svcerr_systemerr(rqst); - } + else + NFSCL_DEBUG(1, "cbrep sent\n"); svc_freereq(rqst); } @@ -271,13 +274,15 @@ nfsrvd_cbinit(int terminating) NFSD_LOCK_ASSERT(); if (terminating) { + /* Wait for any xprt registrations to complete. */ + while (nfs_numnfscbd > 0) + msleep(&nfs_numnfscbd, NFSDLOCKMUTEXPTR, PZERO, + "nfscbdt", 0); NFSD_UNLOCK(); svcpool_destroy(nfscbd_pool); nfscbd_pool = NULL; - NFSD_LOCK(); - } - - NFSD_UNLOCK(); + } else + NFSD_UNLOCK(); nfscbd_pool = svcpool_create("nfscbd", NULL); nfscbd_pool->sp_rcache = NULL; |