diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-06-25 03:28:17 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-06-25 03:28:17 +0000 |
commit | 02698d2f8cd41e95a05746c99ee27bcc29a1549d (patch) | |
tree | 6ff1e61ba9a420b787527749c074929ad022fa76 /sys/nfs/nfs_socket.c | |
parent | eebaafe0f06c811aadafe68ad8a541c33236040c (diff) |
Remove NQNFS
Diffstat (limited to 'sys/nfs/nfs_socket.c')
-rw-r--r-- | sys/nfs/nfs_socket.c | 110 |
1 files changed, 17 insertions, 93 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index d42f5d54b74..8f52565b268 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.21 2001/05/20 08:32:35 angelos Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.22 2001/06/25 03:28:09 csapuntz Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -69,7 +69,6 @@ #include <nfs/nfsmount.h> #include <nfs/nfsnode.h> #include <nfs/nfsrtt.h> -#include <nfs/nqnfs.h> #include <nfs/nfs_var.h> #define TRUE 1 @@ -100,8 +99,7 @@ extern u_int32_t rpc_reply, rpc_msgdenied, rpc_mismatch, rpc_vers, rpc_auth_unix, rpc_msgaccepted, rpc_call, rpc_autherr, rpc_auth_kerb; -extern u_int32_t nfs_prog, nqnfs_prog; -extern time_t nqnfsstarttime; +extern u_int32_t nfs_prog; extern struct nfsstats nfsstats; extern int nfsv3_procid[NFS_NPROCS]; extern int nfs_ticks; @@ -698,13 +696,8 @@ nfs_reply(myrep) nfsm_dissect(tl, u_int32_t *, 2*NFSX_UNSIGNED); rxid = *tl++; if (*tl != rpc_reply) { - if (nmp->nm_flag & NFSMNT_NQNFS) { - if (nqnfs_callback(nmp, mrep, md, dpos)) - nfsstats.rpcinvalid++; - } else { - nfsstats.rpcinvalid++; - m_freem(mrep); - } + nfsstats.rpcinvalid++; + m_freem(mrep); nfsmout: if (myrep->r_flags & R_GETONEREP) return (0); @@ -823,15 +816,13 @@ nfs_request(vp, mrest, procnum, procp, cred, mrp, mdp, dposp) register int i; struct nfsmount *nmp; struct mbuf *md, *mheadend; - struct nfsnode *np; char nickv[RPCX_NICKVERF]; time_t reqtime, waituntil; caddr_t dpos, cp2; - int t1, nqlflag, cachable, s, error = 0, mrest_len, auth_len, auth_type; - int trylater_delay = NQ_TRYLATERDEL, trylater_cnt = 0, failed_auth = 0; + int t1, s, error = 0, mrest_len, auth_len, auth_type; + int trylater_delay = 15, trylater_cnt = 0, failed_auth = 0; int verf_len, verf_type; u_int32_t xid; - u_quad_t frev; char *auth_str, *verf_str; NFSKERBKEY_T key; /* save session key */ @@ -1053,24 +1044,6 @@ tryagain: return (error); } - /* - * For nqnfs, get any lease in reply - */ - if (nmp->nm_flag & NFSMNT_NQNFS) { - nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); - if (*tl) { - np = VTONFS(vp); - nqlflag = fxdr_unsigned(int, *tl); - nfsm_dissect(tl, u_int32_t *, 4*NFSX_UNSIGNED); - cachable = fxdr_unsigned(int, *tl++); - reqtime += fxdr_unsigned(int, *tl++); - if (reqtime > time.tv_sec) { - frev = fxdr_hyper(tl); - nqnfs_clientlease(nmp, np, nqlflag, - cachable, reqtime, frev); - } - } - } *mrp = mrep; *mdp = md; *dposp = dpos; @@ -1189,13 +1162,8 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp) case EPROGMISMATCH: *tl = txdr_unsigned(RPC_PROGMISMATCH); nfsm_build(tl, u_int32_t *, 2 * NFSX_UNSIGNED); - if (nd->nd_flag & ND_NQNFS) { - *tl++ = txdr_unsigned(3); - *tl = txdr_unsigned(3); - } else { - *tl++ = txdr_unsigned(2); - *tl = txdr_unsigned(3); - } + *tl++ = txdr_unsigned(2); + *tl = txdr_unsigned(3); break; case EPROCUNAVAIL: *tl = txdr_unsigned(RPC_PROCUNAVAIL); @@ -1216,21 +1184,6 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp) }; } - /* - * For nqnfs, piggyback lease as requested. - */ - if ((nd->nd_flag & ND_NQNFS) && err == 0) { - if (nd->nd_flag & ND_LEASE) { - nfsm_build(tl, u_int32_t *, 5 * NFSX_UNSIGNED); - *tl++ = txdr_unsigned(nd->nd_flag & ND_LEASE); - *tl++ = txdr_unsigned(cache); - *tl++ = txdr_unsigned(nd->nd_duration); - txdr_hyper(*frev, tl); - } else { - nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED); - *tl = 0; - } - } *mrq = mreq; if (mrq != NULL) *mbp = mb; @@ -1259,7 +1212,6 @@ nfs_timer(arg) int s, error; #ifdef NFSSERVER struct nfssvc_sock *slp; - static long lasttime = 0; u_quad_t cur_usec; #endif @@ -1353,14 +1305,6 @@ nfs_timer(arg) #ifdef NFSSERVER /* - * Call the nqnfs server timer once a second to handle leases. - */ - if (lasttime != time.tv_sec) { - lasttime = time.tv_sec; - nqnfs_serverd(); - } - - /* * Scan the write gathering queues for writes that need to be * completed now. */ @@ -1603,7 +1547,7 @@ nfs_getreq(nd, nfsd, has_header) caddr_t dpos, cp2, cp; u_int32_t nfsvers, auth_type; uid_t nickuid; - int error = 0, nqnfs = 0, ticklen; + int error = 0, ticklen; struct mbuf *mrep, *md; register struct nfsuid *nuidp; struct timeval tvin, tvout; @@ -1628,31 +1572,24 @@ nfs_getreq(nd, nfsd, has_header) return (0); } if (*tl != nfs_prog) { - if (*tl == nqnfs_prog) - nqnfs++; - else { - nd->nd_repstat = EPROGUNAVAIL; - nd->nd_procnum = NFSPROC_NOOP; - return (0); - } + nd->nd_repstat = EPROGUNAVAIL; + nd->nd_procnum = NFSPROC_NOOP; + return (0); } tl++; nfsvers = fxdr_unsigned(u_int32_t, *tl++); - if (((nfsvers < NFS_VER2 || nfsvers > NFS_VER3) && !nqnfs) || - (nfsvers != NQNFS_VER3 && nqnfs)) { + if (nfsvers != NFS_VER2 && nfsvers != NFS_VER3) { nd->nd_repstat = EPROGMISMATCH; nd->nd_procnum = NFSPROC_NOOP; return (0); } - if (nqnfs) - nd->nd_flag = (ND_NFSV3 | ND_NQNFS); - else if (nfsvers == NFS_VER3) + if (nfsvers == NFS_VER3) nd->nd_flag = ND_NFSV3; nd->nd_procnum = fxdr_unsigned(u_int32_t, *tl++); if (nd->nd_procnum == NFSPROC_NULL) return (0); if (nd->nd_procnum >= NFS_NPROCS || - (!nqnfs && nd->nd_procnum >= NQNFSPROC_GETLEASE) || + (nd->nd_procnum > NFSPROC_COMMIT) || (!nd->nd_flag && nd->nd_procnum > NFSV2PROC_STATFS)) { nd->nd_repstat = EPROCUNAVAIL; nd->nd_procnum = NFSPROC_NOOP; @@ -1808,19 +1745,6 @@ nfs_getreq(nd, nfsd, has_header) return (0); } - /* - * For nqnfs, get piggybacked lease request. - */ - if (nqnfs && nd->nd_procnum != NQNFSPROC_EVICTED) { - nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); - nd->nd_flag |= fxdr_unsigned(int, *tl); - if (nd->nd_flag & ND_LEASE) { - nfsm_dissect(tl, u_int32_t *, NFSX_UNSIGNED); - nd->nd_duration = fxdr_unsigned(u_int32_t, *tl); - } else - nd->nd_duration = NQ_MINLEASE; - } else - nd->nd_duration = NQ_MINLEASE; nd->nd_md = md; nd->nd_dpos = dpos; return (0); @@ -1870,8 +1794,8 @@ int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *, nfsrv_fsinfo, nfsrv_pathconf, nfsrv_commit, - nqnfsrv_getlease, - nqnfsrv_vacated, + nfsrv_noop, + nfsrv_noop, nfsrv_noop, nfsrv_noop }; |