bp->b_flags &= ~(B_NEEDCOMMIT | B_CLUSTEROK);
bp->b_resid = 0;
biodone(bio);
+ return;
}
if (retv == NFSERR_STALEWRITEVERF) {
nfs_clearcommit(vp->v_mount);
} else {
bp->b_resid = 0;
biodone(bio);
+ return;
}
}
bp->b_resid = uiop->uio_resid;
u_quad_t cur_usec;
struct nfsm_info info;
+ info.mreq = NULL;
+
nfsdbprintf(("%s %d\n", __FILE__, __LINE__));
#ifndef nolint
i = 0;
break;
}
crit_exit();
+ *mrq = info.mreq;
return (0);
}
/* fall through */
nfsmout:
- info.mreq = NULL;
+ *mrq = info.mreq;
if (dirp)
vrele(dirp);
nlookup_done(&nd);
}
nfsm_srvwcc_data(&info, nfsd, dirfor_ret, &dirfor,
diraft_ret, &diraft);
+ *mrq = info.mreq;
return (0);
nfsmout:
*mrq = info.mreq;
* We probably don't need to push an nbio any more since no
* block conversion is required due to the use of 64 bit byte
* offsets, but do it anyway.
+ *
+ * NOTE: When NFS callers itself via this strategy routines and
+ * sets up a synchronous I/O, it expects the I/O to run
+ * synchronously (its bio_done routine just assumes it),
+ * so for now we have to honor the bit.
*/
nbio = push_bio(bio);
nbio->bio_offset = bio->bio_offset;
+ nbio->bio_flags = bio->bio_flags & BIO_SYNC;
/*
* If the op is asynchronous and an i/o daemon is waiting
}
void *
-_nfsm_clget(nfsm_info_t info, struct mbuf *mp1, struct mbuf *mp2,
- char *bp, char *be)
+_nfsm_clget(nfsm_info_t info, struct mbuf **mp1, struct mbuf **mp2,
+ char **bp, char **be)
{
- u_int32_t *tl;
-
- if (bp >= be) {
- if (mp1 == info->mb)
- mp1->m_len += bp - info->bpos;
- mp1 = m_getcl(MB_WAIT, MT_DATA, 0);
- mp1->m_len = MCLBYTES;
- mp2->m_next = mp1;
- mp2 = mp1;
- bp = mtod(mp1, caddr_t);
- be = bp + mp1->m_len;
+ if (*bp >= *be) {
+ if (*mp1 == info->mb)
+ (*mp1)->m_len += *bp - info->bpos;
+ *mp1 = m_getcl(MB_WAIT, MT_DATA, 0);
+ (*mp1)->m_len = MCLBYTES;
+ (*mp2)->m_next = *mp1;
+ *mp2 = *mp1;
+ *bp = mtod(*mp1, caddr_t);
+ *be = *bp + (*mp1)->m_len;
}
- tl = (u_int32_t *)bp;
- return (tl);
+ return(*bp);
}
int
int nfsm_adv(nfsm_info_t info, int len);
int nfsm_srvmtofh(nfsm_info_t info, struct nfsrv_descript *nfsd,
fhandle_t *fhp, int *errorp);
-void *_nfsm_clget(nfsm_info_t info, struct mbuf *mp1, struct mbuf *mp2,
- char *bp, char *be);
+void *_nfsm_clget(nfsm_info_t info, struct mbuf **mp1, struct mbuf **mp2,
+ char **bp, char **be);
int nfsm_srvsattr(nfsm_info_t info, struct vattr *vap);
int nfsm_mbuftouio(struct mbuf **mrep, struct uio *uiop,
int siz, caddr_t *dpos);
int nfs_request (struct nfsm_info *, nfsm_state_t, nfsm_state_t);
#define nfsm_clget(info, mp1, mp2, bp, be) \
- ((bp >= be) ? _nfsm_clget(info, mp1, mp2, bp, be) : (void *)bp)
+ ((bp >= be) ? _nfsm_clget(info, &mp1, &mp2, &bp, &be) : (void *)bp)
#define nfsm_rndup(a) (((a) + 3) & (~0x3))