Home | History | Annotate | Download | only in nfs

Lines Matching defs:rep

96 nfs_receive(struct nfsreq *rep, struct mbuf **aname, struct mbuf **mp,
113 sotype = rep->r_nmp->nm_sotype;
124 error = nfs_sndlock(rep->r_nmp, rep);
137 if (rep->r_mrep || (rep->r_flags & R_SOFTTERM)) {
138 nfs_sndunlock(rep->r_nmp);
141 so = rep->r_nmp->nm_so;
143 error = nfs_reconnect(rep);
145 nfs_sndunlock(rep->r_nmp);
150 while (rep->r_flags & R_MUSTRESEND) {
151 m = m_copym(rep->r_mreq, 0, M_COPYALL, M_WAIT);
153 rep->r_rtt = 0;
154 rep->r_flags &= ~R_TIMING;
155 error = nfs_send(so, rep->r_nmp->nm_nam, m, rep, l);
158 (error = nfs_reconnect(rep)) != 0) {
159 nfs_sndunlock(rep->r_nmp);
165 nfs_sndunlock(rep->r_nmp);
179 if (error == EWOULDBLOCK && rep) {
180 if (rep->r_flags & R_SOFTTERM)
187 if (rep->r_rexmit >= rep->r_nmp->nm_retry) {
205 rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
219 rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
235 rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
254 if (error == EWOULDBLOCK && rep) {
255 if (rep->r_flags & R_SOFTTERM)
274 rep->r_nmp->nm_mountp->mnt_stat.f_mntfromname);
275 error = nfs_sndlock(rep->r_nmp, rep);
277 error = nfs_reconnect(rep);
281 nfs_sndunlock(rep->r_nmp);
284 if ((so = rep->r_nmp->nm_so) == NULL)
297 int intr = nfs_sigintr(rep->r_nmp, rep, l);
322 struct nfsreq *rep;
407 TAILQ_FOREACH(rep, &nfs_reqq, r_chain) {
408 if (rep->r_mrep != NULL || rxid != rep->r_xid)
412 rep->r_mrep = mrep;
413 rep->r_md = md;
414 rep->r_dpos = dpos;
417 int proct = nfs_proct[rep->r_procnum];
420 rt->proc = rep->r_procnum;
428 if (rep->r_flags & R_TIMING)
429 rt->rtt = rep->r_rtt;
446 rep->r_flags &= ~R_SENT;
452 if (rep->r_flags & R_TIMING) {
461 t1 = rep->r_rtt + 1;
462 t1 -= (NFS_SRTT(rep) >> 3);
463 NFS_SRTT(rep) += t1;
466 t1 -= (NFS_SDRTT(rep) >> 2);
467 NFS_SDRTT(rep) += t1;
479 if (rep == 0) {
482 } else if (rep == myrep) {
483 if (rep->r_mrep == NULL)
504 struct nfsreq *rep;
531 rep = kmem_alloc(sizeof(*rep), KM_SLEEP);
532 rep->r_nmp = nmp;
534 rep->r_lwp = lwp;
535 rep->r_procnum = procnum;
556 error = nfs_getauth(nmp, rep, cred, &auth_str,
559 kmem_free(rep, sizeof(*rep));
635 rep->r_mreq = m;
636 rep->r_xid = xid;
639 rep->r_retry = nmp->nm_retry;
641 rep->r_retry = NFS_MAXREXMIT + 1; /* past clip limit */
642 rep->r_rtt = rep->r_rexmit = 0;
644 rep->r_flags = R_TIMING;
646 rep->r_flags = 0;
647 rep->r_mrep = NULL;
659 TAILQ_INSERT_TAIL(&nfs_reqq, rep, r_chain);
672 error = nfs_sndlock(nmp, rep);
674 m = m_copym(rep->r_mreq, 0, M_COPYALL, M_WAIT);
675 error = nfs_send(nmp->nm_so, nmp->nm_nam, m, rep, lwp);
680 if (!error && (rep->r_flags & R_MUSTRESEND) == 0) {
681 if ((rep->r_flags & R_SENT) == 0) {
683 rep->r_flags |= R_SENT;
689 rep->r_rtt = -1;
696 error = nfs_reply(rep, lwp);
703 TAILQ_REMOVE(&nfs_reqq, rep, r_chain);
709 if (rep->r_flags & R_SENT) {
710 rep->r_flags &= ~R_SENT; /* paranoia */
719 rexmit = (rep->r_flags & R_REXMITTED) != 0;
721 rexmit = rep->r_rexmit;
729 if (!error && (rep->r_flags & R_TPRINTFMSG))
730 nfs_msg(rep->r_lwp, nmp->nm_mountp->mnt_stat.f_mntfromname,
732 mrep = rep->r_mrep;
733 md = rep->r_md;
734 dpos = rep->r_dpos;
750 m_freem(rep->r_mreq);
799 m_freem(rep->r_mreq);
800 kmem_free(rep, sizeof(*rep));
919 nfs_renewxid(rep);
960 m_freem(rep->r_mreq);
961 kmem_free(rep, sizeof(*rep));
973 nfs_sndlock(struct nfsmount *nmp, struct nfsreq *rep)
986 if (rep) {
987 l = rep->r_lwp;
988 if (rep->r_nmp->nm_flag & NFSMNT_INT)
994 if (rep && nfs_sigintr(rep->r_nmp, rep, l)) {