NFSX_FH+NFSX_UNSIGNED+nfsm_rndup(len)+NFSX_SATTR(isnq)); nfsm_fhtom(dvp);
NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(len) + NFSX_SATTR(v3)); nfsm_fhtom(dvp, v3);
nfs_mkdir(v)	void *v;{	struct vop_mkdir_args /* {		struct vnode *a_dvp;		struct vnode **a_vpp;		struct componentname *a_cnp;		struct vattr *a_vap;	} */ *ap = v;	register struct vnode *dvp = ap->a_dvp;	register struct vattr *vap = ap->a_vap;	register struct componentname *cnp = ap->a_cnp;	register struct vnode **vpp = ap->a_vpp;	register struct nfsv2_sattr *sp;	register u_int32_t *tl;	register caddr_t cp;	register int32_t t1, t2;	register int len;	caddr_t bpos, dpos, cp2;	int error = 0, firsttry = 1, isnq;	struct mbuf *mreq, *mrep, *md, *mb, *mb2;	len = cnp->cn_namelen;	isnq = (VFSTONFS(dvp->v_mount)->nm_flag & NFSMNT_NQNFS);	nfsstats.rpccnt[NFSPROC_MKDIR]++;	nfsm_reqhead(dvp, NFSPROC_MKDIR,	  NFSX_FH+NFSX_UNSIGNED+nfsm_rndup(len)+NFSX_SATTR(isnq));	nfsm_fhtom(dvp);	nfsm_strtom(cnp->cn_nameptr, len, NFS_MAXNAMLEN);	nfsm_build(sp, struct nfsv2_sattr *, NFSX_SATTR(isnq));	sp->sa_mode = vtonfs_mode(VDIR, vap->va_mode);	sp->sa_uid = nfs_xdrneg1;	sp->sa_gid = nfs_xdrneg1;	if (isnq) {		quad_t qval = -1;		txdr_hyper(&qval, &sp->sa_nqsize);		sp->sa_nqflags = 0;		txdr_nqtime(&vap->va_atime, &sp->sa_nqatime);		txdr_nqtime(&vap->va_mtime, &sp->sa_nqmtime);	} else {		sp->sa_nfssize = nfs_xdrneg1;		txdr_nfstime(&vap->va_atime, &sp->sa_nfsatime);		txdr_nfstime(&vap->va_mtime, &sp->sa_nfsmtime);	}	nfsm_request(dvp, NFSPROC_MKDIR, cnp->cn_proc, cnp->cn_cred);	nfsm_mtofh(dvp, *vpp);	nfsm_reqdone;	VTONFS(dvp)->n_flag |= NMODIFIED;	VTONFS(dvp)->n_attrstamp = 0;	/*	 * Kludge: Map EEXIST => 0 assuming that you have a reply to a retry	 * if we can succeed in looking up the directory.	 * "firsttry" is necessary since the macros may "goto nfsmout" which	 * is above the if on errors. (Ugh)	 */	if (error == EEXIST && firsttry) {		firsttry = 0;		error = 0;		nfsstats.rpccnt[NFSPROC_LOOKUP]++;		*vpp = NULL;		nfsm_reqhead(dvp, NFSPROC_LOOKUP,		    NFSX_FH+NFSX_UNSIGNED+nfsm_rndup(len));		nfsm_fhtom(dvp);		nfsm_strtom(cnp->cn_nameptr, len, NFS_MAXNAMLEN);		nfsm_request(dvp, NFSPROC_LOOKUP, cnp->cn_proc, cnp->cn_cred);		nfsm_mtofh(dvp, *vpp);		if ((*vpp)->v_type != VDIR) {			vput(*vpp);			error = EEXIST;		}		m_freem(mrep);	}	FREE(cnp->cn_pnbuf, M_NAMEI);	vrele(dvp);	return (error);}