nfs_writerpc(vp, uiop, cred, ioflags)
nfs_writerpc(vp, uiop, cred, iomode, must_commit)
nfs_writerpc(vp, uiop, cred, ioflags)	register struct vnode *vp;	struct uio *uiop;	struct ucred *cred;	int ioflags;{	register u_int32_t *tl;	register caddr_t cp;	register int32_t t1;	caddr_t bpos, dpos, cp2;	int error = 0;	struct mbuf *mreq, *mrep, *md, *mb, *mb2;	struct nfsmount *nmp;	struct nfsnode *np = VTONFS(vp);	u_quad_t frev;	long len, tsiz;	nmp = VFSTONFS(vp->v_mount);	tsiz = uiop->uio_resid;	if (uiop->uio_offset + tsiz > 0xffffffff &&	    (nmp->nm_flag & NFSMNT_NQNFS) == 0)		return (EFBIG);	while (tsiz > 0) {		nfsstats.rpccnt[NFSPROC_WRITE]++;		len = (tsiz > nmp->nm_wsize) ? nmp->nm_wsize : tsiz;		nfsm_reqhead(vp, NFSPROC_WRITE,			NFSX_FH+NFSX_UNSIGNED*4+nfsm_rndup(len));		nfsm_fhtom(vp);		nfsm_build(tl, u_int32_t *, NFSX_UNSIGNED * 4);		if (nmp->nm_flag & NFSMNT_NQNFS) {			txdr_hyper(&uiop->uio_offset, tl);			tl += 2;			*tl++ = 0;			*tl = txdr_unsigned(len);		} else {			register u_int32_t x;			/* Set both "begin" and "current" to non-garbage. */			x = txdr_unsigned((u_int32_t)uiop->uio_offset);			*tl++ = x;	/* "begin offset" */			*tl++ = x;	/* "current offset" */			x = txdr_unsigned(len);			*tl++ = x;	/* total to this offset */			*tl = x;	/* size of this write */		}		nfsm_uiotom(uiop, len);		nfsm_request(vp, NFSPROC_WRITE, uiop->uio_procp, cred);		nfsm_loadattr(vp, (struct vattr *)0);		if (nmp->nm_flag & NFSMNT_MYWRITE)			VTONFS(vp)->n_mtime = VTONFS(vp)->n_vattr.va_mtime.tv_sec;		else if ((nmp->nm_flag & NFSMNT_NQNFS) &&			 NQNFS_CKCACHABLE(vp, NQL_WRITE)) {			nfsm_dissect(tl, u_int32_t *, 2*NFSX_UNSIGNED);			fxdr_hyper(tl, &frev);			if (frev > np->n_brev)				np->n_brev = frev;		}		m_freem(mrep);		tsiz -= len;	}nfsmout:	if (error)		uiop->uio_resid = tsiz;	return (error);}