diff options
author | dfr <dfr@FreeBSD.org> | 2009-06-30 19:10:17 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2009-06-30 19:10:17 +0000 |
commit | 836bf4cc580f1658ab6e9ccc71a8fb189b302a4c (patch) | |
tree | 1f9d7b54916b8144d1a37c6378b201c1eb421df4 /sys | |
parent | 5d248bb05f33623d905b8b5a72d90e459d23be96 (diff) | |
download | FreeBSD-src-836bf4cc580f1658ab6e9ccc71a8fb189b302a4c.zip FreeBSD-src-836bf4cc580f1658ab6e9ccc71a8fb189b302a4c.tar.gz |
Adjust the internal NFS KPI to avoid the last traces of NFS_LEGACYRPC.
Approved by: re
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfsclient/nfs.h | 9 | ||||
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 20 | ||||
-rw-r--r-- | sys/nfsclient/nfs_krpc.c | 6 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vnops.c | 8 |
5 files changed, 21 insertions, 26 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index fa7d5ba..18eae3b 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -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 *, struct buf *, struct ucred *, struct thread * 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 *); diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index 95d6e2f..c803d68 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -504,7 +504,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag, struct ucred *cred) 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 *uio, int ioflag, struct ucred *cred) 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 *uio, int ioflag, struct ucred *cred) 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 *uio, int ioflag, struct ucred *cred) 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 *uio, int ioflag, struct ucred *cred) 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_t bn, int size, struct thread *td) 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 flags, struct thread *td, int intrflg) * 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); diff --git a/sys/nfsclient/nfs_krpc.c b/sys/nfsclient/nfs_krpc.c index 44b852d..098c46b 100644 --- a/sys/nfsclient/nfs_krpc.c +++ b/sys/nfsclient/nfs_krpc.c @@ -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 mbuf *mreq, int procnum, * 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 *ident, struct mtx *mtx, int priority, char * * 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; diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 599aea0..e43f196 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -730,7 +730,7 @@ nfs_decode_args(struct mount *mp, struct nfsmount *nmp, struct nfs_args *argp, 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 mount *mp, struct sockaddr *nam, * 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; /* diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index e557321..060ac54 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -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; |