Author: dfr
Date: Tue Jun 30 19:10:17 2009
New Revision: 195203
URL: http://svn.freebsd.org/changeset/base/195203

Log:
  Adjust the internal NFS KPI to avoid the last traces of NFS_LEGACYRPC.
  
  Approved by: re

Modified:
  head/sys/nfsclient/nfs.h
  head/sys/nfsclient/nfs_bio.c
  head/sys/nfsclient/nfs_krpc.c
  head/sys/nfsclient/nfs_vfsops.c
  head/sys/nfsclient/nfs_vnops.c

Modified: head/sys/nfsclient/nfs.h
==============================================================================
--- head/sys/nfsclient/nfs.h    Tue Jun 30 19:03:27 2009        (r195202)
+++ head/sys/nfsclient/nfs.h    Tue Jun 30 19:10:17 2009        (r195203)
@@ -147,11 +147,6 @@ extern int nfsv3_procid[NFS_NPROCS];
                (e) != ERESTART && (e) != EWOULDBLOCK && \
                ((s) & PR_CONNREQUIRED) == 0)
 
-/*
- * This is only needed to keep things working while we support
- * compiling for both RPC implementations.
- */
-struct nfsreq;
 struct nfsmount;
 
 struct buf;
@@ -262,7 +257,7 @@ int nfs_asyncio(struct nfsmount *, struc
 int    nfs_doio(struct vnode *, struct buf *, struct ucred *, struct thread *);
 void   nfs_doio_directwrite (struct buf *);
 int    nfs_readlinkrpc(struct vnode *, struct uio *, struct ucred *);
-int    nfs_sigintr(struct nfsmount *, struct nfsreq *, struct thread *);
+int    nfs_sigintr(struct nfsmount *, struct thread *);
 int    nfs_readdirplusrpc(struct vnode *, struct uio *, struct ucred *);
 int    nfs_request(struct vnode *, struct mbuf *, int, struct thread *,
            struct ucred *, struct mbuf **, struct mbuf **, caddr_t *);
@@ -274,7 +269,7 @@ void        nfs_nhuninit(void);
 int    nfs_nmcancelreqs(struct nfsmount *);
 void   nfs_timer(void*);
 
-int    nfs_connect(struct nfsmount *, struct nfsreq *);
+int    nfs_connect(struct nfsmount *);
 void   nfs_disconnect(struct nfsmount *);
 void   nfs_safedisconnect(struct nfsmount *);
 int    nfs_getattrcache(struct vnode *, struct vattr *);

Modified: head/sys/nfsclient/nfs_bio.c
==============================================================================
--- head/sys/nfsclient/nfs_bio.c        Tue Jun 30 19:03:27 2009        
(r195202)
+++ head/sys/nfsclient/nfs_bio.c        Tue Jun 30 19:10:17 2009        
(r195203)
@@ -504,7 +504,7 @@ nfs_bioread(struct vnode *vp, struct uio
                        if (incore(&vp->v_bufobj, rabn) == NULL) {
                            rabp = nfs_getcacheblk(vp, rabn, biosize, td);
                            if (!rabp) {
-                               error = nfs_sigintr(nmp, NULL, td);
+                               error = nfs_sigintr(nmp, td);
                                return (error ? error : EINTR);
                            }
                            if ((rabp->b_flags & (B_CACHE|B_DELWRI)) == 0) {
@@ -535,7 +535,7 @@ nfs_bioread(struct vnode *vp, struct uio
                bp = nfs_getcacheblk(vp, lbn, bcount, td);
 
                if (!bp) {
-                       error = nfs_sigintr(nmp, NULL, td);
+                       error = nfs_sigintr(nmp, td);
                        return (error ? error : EINTR);
                }
 
@@ -570,7 +570,7 @@ nfs_bioread(struct vnode *vp, struct uio
                nfsstats.biocache_readlinks++;
                bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, td);
                if (!bp) {
-                       error = nfs_sigintr(nmp, NULL, td);
+                       error = nfs_sigintr(nmp, td);
                        return (error ? error : EINTR);
                }
                if ((bp->b_flags & B_CACHE) == 0) {
@@ -596,7 +596,7 @@ nfs_bioread(struct vnode *vp, struct uio
                on = uio->uio_offset & (NFS_DIRBLKSIZ - 1);
                bp = nfs_getcacheblk(vp, lbn, NFS_DIRBLKSIZ, td);
                if (!bp) {
-                   error = nfs_sigintr(nmp, NULL, td);
+                   error = nfs_sigintr(nmp, td);
                    return (error ? error : EINTR);
                }
                if ((bp->b_flags & B_CACHE) == 0) {
@@ -625,7 +625,7 @@ nfs_bioread(struct vnode *vp, struct uio
                                    return (0);
                            bp = nfs_getcacheblk(vp, i, NFS_DIRBLKSIZ, td);
                            if (!bp) {
-                               error = nfs_sigintr(nmp, NULL, td);
+                               error = nfs_sigintr(nmp, td);
                                return (error ? error : EINTR);
                            }
                            if ((bp->b_flags & B_CACHE) == 0) {
@@ -1080,7 +1080,7 @@ again:
                }
 
                if (!bp) {
-                       error = nfs_sigintr(nmp, NULL, td);
+                       error = nfs_sigintr(nmp, td);
                        if (!error)
                                error = EINTR;
                        break;
@@ -1257,7 +1257,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_
                bp = getblk(vp, bn, size, PCATCH, 0, 0);
                nfs_restore_sigmask(td, &oldset);
                while (bp == NULL) {
-                       if (nfs_sigintr(nmp, NULL, td))
+                       if (nfs_sigintr(nmp, td))
                                return (NULL);
                        bp = getblk(vp, bn, size, 0, 2 * hz, 0);
                }
@@ -1321,13 +1321,13 @@ nfs_vinvalbuf(struct vnode *vp, int flag
                 * Not doing so, we run the risk of losing dirty pages in the 
                 * vinvalbuf() call below.
                 */
-               if (intrflg && (error = nfs_sigintr(nmp, NULL, td)))
+               if (intrflg && (error = nfs_sigintr(nmp, td)))
                        goto out;
        }
 
        error = vinvalbuf(vp, flags, slpflag, 0);
        while (error) {
-               if (intrflg && (error = nfs_sigintr(nmp, NULL, td)))
+               if (intrflg && (error = nfs_sigintr(nmp, td)))
                        goto out;
                error = vinvalbuf(vp, flags, 0, slptimeo);
        }
@@ -1434,7 +1434,7 @@ again:
                                           slpflag | PRIBIO,
                                           "nfsaio", slptimeo);
                        if (error) {
-                               error2 = nfs_sigintr(nmp, NULL, td);
+                               error2 = nfs_sigintr(nmp, td);
                                if (error2) {
                                        mtx_unlock(&nfs_iod_mtx);               
                        
                                        return (error2);

Modified: head/sys/nfsclient/nfs_krpc.c
==============================================================================
--- head/sys/nfsclient/nfs_krpc.c       Tue Jun 30 19:03:27 2009        
(r195202)
+++ head/sys/nfsclient/nfs_krpc.c       Tue Jun 30 19:10:17 2009        
(r195203)
@@ -183,7 +183,7 @@ nfs_init_rtt(struct nfsmount *nmp)
  * We do not free the sockaddr if error.
  */
 int
-nfs_connect(struct nfsmount *nmp, struct nfsreq *rep)
+nfs_connect(struct nfsmount *nmp)
 {
        int rcvreserve, sndreserve;
        int pktscale;
@@ -511,7 +511,7 @@ nfs_request(struct vnode *vp, struct mbu
         * and let clnt_reconnect_create handle reconnects.
         */
        if (!nmp->nm_client)
-               nfs_connect(nmp, NULL);
+               nfs_connect(nmp);
 
        auth = nfs_getauth(nmp, cred);
        if (!auth) {
@@ -799,7 +799,7 @@ nfs_msleep(struct thread *td, void *iden
  * This is used for NFSMNT_INT mounts.
  */
 int
-nfs_sigintr(struct nfsmount *nmp, struct nfsreq *rep, struct thread *td)
+nfs_sigintr(struct nfsmount *nmp, struct thread *td)
 {
        struct proc *p;
        sigset_t tmpset;

Modified: head/sys/nfsclient/nfs_vfsops.c
==============================================================================
--- head/sys/nfsclient/nfs_vfsops.c     Tue Jun 30 19:03:27 2009        
(r195202)
+++ head/sys/nfsclient/nfs_vfsops.c     Tue Jun 30 19:10:17 2009        
(r195203)
@@ -730,7 +730,7 @@ nfs_decode_args(struct mount *mp, struct
        if (nmp->nm_client && adjsock) {
                nfs_safedisconnect(nmp);
                if (nmp->nm_sotype == SOCK_DGRAM)
-                       while (nfs_connect(nmp, NULL)) {
+                       while (nfs_connect(nmp)) {
                                printf("nfs_args: retrying connect\n");
                                (void) tsleep(&fake_wchan, PSOCK, "nfscon", hz);
                        }
@@ -1229,7 +1229,7 @@ mountnfs(struct nfs_args *argp, struct m
         * the first request, in case the server is not responding.
         */
        if (nmp->nm_sotype == SOCK_DGRAM &&
-               (error = nfs_connect(nmp, NULL)))
+               (error = nfs_connect(nmp)))
                goto bad;
 
        /*

Modified: head/sys/nfsclient/nfs_vnops.c
==============================================================================
--- head/sys/nfsclient/nfs_vnops.c      Tue Jun 30 19:03:27 2009        
(r195202)
+++ head/sys/nfsclient/nfs_vnops.c      Tue Jun 30 19:10:17 2009        
(r195203)
@@ -3128,7 +3128,7 @@ loop:
                                error = 0;
                                goto loop;
                        }
-                       if (nfs_sigintr(nmp, NULL, td)) {
+                       if (nfs_sigintr(nmp, td)) {
                                error = EINTR;
                                goto done;
                        }
@@ -3151,7 +3151,7 @@ loop:
                else
                    bp->b_flags |= B_ASYNC;
                bwrite(bp);
-               if (nfs_sigintr(nmp, NULL, td)) {
+               if (nfs_sigintr(nmp, td)) {
                        error = EINTR;
                        goto done;
                }
@@ -3167,7 +3167,7 @@ loop:
                        error = bufobj_wwait(bo, slpflag, slptimeo);
                        if (error) {
                            BO_UNLOCK(bo);
-                           error = nfs_sigintr(nmp, NULL, td);
+                           error = nfs_sigintr(nmp, td);
                            if (error)
                                goto done;
                            if (slpflag == PCATCH) {
@@ -3192,7 +3192,7 @@ loop:
                                           &np->n_mtx, slpflag | (PRIBIO + 1), 
                                           "nfsfsync", 0);
                        if (error) {
-                               if (nfs_sigintr(nmp, NULL, td)) {
+                               if (nfs_sigintr(nmp, td)) {
                                        mtx_unlock(&np->n_mtx);
                                        error = EINTR;  
                                        goto done;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to