From owner-svn-src-projects@freebsd.org Mon Feb 17 21:10:33 2020 Return-Path: Delivered-To: svn-src-projects@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D09A247319 for ; Mon, 17 Feb 2020 21:10:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48LxTj2y6hz3whK; Mon, 17 Feb 2020 21:10:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27B3DD2ED; Mon, 17 Feb 2020 21:10:33 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 01HLAXUR003013; Mon, 17 Feb 2020 21:10:33 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 01HLAXZY003012; Mon, 17 Feb 2020 21:10:33 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202002172110.01HLAXZY003012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Mon, 17 Feb 2020 21:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r358053 - projects/nfs-over-tls/sys/fs/nfsclient X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: projects/nfs-over-tls/sys/fs/nfsclient X-SVN-Commit-Revision: 358053 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Feb 2020 21:10:33 -0000 Author: rmacklem Date: Mon Feb 17 21:10:32 2020 New Revision: 358053 URL: https://svnweb.freebsd.org/changeset/base/358053 Log: Update nfs_clrpcops.c to handle ext_pgs mbufs, including the additional argument to nfscl_reqstart() to tell it if it should build ext_pgs mbufs. This completes most of the conversion to support of ext_pgs mbufs, but there are still a couple of areas to fix. 1 - The code that the MDS uses to do a proxy to a DS for a pNFS server. 2 - The krpc code on the receive side. (The NFS code now handles the ext_pgs mbufs, but they are being created by copying the regular mbuf list when the NFS code gets it from the krpc.) The krpc still needs to be fixed so it can handle a list of ext_pgs mbufs handed to it by soreceive(). Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c Mon Feb 17 21:02:30 2020 (r358052) +++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c Mon Feb 17 21:10:32 2020 (r358053) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #ifndef APPLEKEXT #include "opt_inet6.h" +#include "opt_kern_tls.h" #include #include @@ -76,6 +77,7 @@ extern int nfscl_debuglevel; extern int nfs_pnfsiothreads; extern u_long sb_max_adj; extern int nfs_maxcopyrange; +extern bool nfs_use_ext_pgs; NFSCLSTATEMUTEX; int nfstest_outofseq = 0; int nfscl_assumeposixlocks = 1; @@ -501,7 +503,8 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int dp = *dpp; *dpp = NULL; - nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_OPEN, nmp, nfhp, fhlen, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); @@ -857,7 +860,7 @@ nfsrpc_closerpc(struct nfsrv_descript *nd, struct nfsm int error; nfscl_reqstart(nd, NFSPROC_CLOSE, nmp, op->nfso_fh, - op->nfso_fhlen, NULL, NULL, 0, 0); + op->nfso_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); if (NFSHASNFSV4N(nmp)) @@ -900,7 +903,7 @@ nfsrpc_openconfirm(vnode_t vp, u_int8_t *nfhp, int fhl if (NFSHASNFSV4N(nmp)) return (0); /* No confirmation for NFSv4.1. */ nfscl_reqstart(nd, NFSPROC_OPENCONFIRM, nmp, nfhp, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_UNSIGNED + NFSX_STATEID); *tl++ = op->nfso_stateid.seqid; *tl++ = op->nfso_stateid.other[0]; @@ -1014,7 +1017,8 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli tsep = NFSMNT_MDSSESSION(nmp); NFSUNLOCKMNT(nmp); - nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_SETCLIENTID, nmp, NULL, 0, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(nfsboottime.tv_sec); *tl = txdr_unsigned(clp->nfsc_rev); @@ -1084,7 +1088,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli * and confirm it. */ nfscl_reqstart(nd, NFSPROC_SETCLIENTIDCFRM, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, 4 * NFSX_UNSIGNED); *tl++ = tsep->nfsess_clientid.lval[0]; *tl++ = tsep->nfsess_clientid.lval[1]; @@ -1099,7 +1103,7 @@ nfsrpc_setclient(struct nfsmount *nmp, struct nfsclcli nd->nd_mrep = NULL; if (nd->nd_repstat == 0) { nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, nmp->nm_fh, - nmp->nm_fhsize, NULL, NULL, 0, 0); + nmp->nm_fhsize, NULL, NULL, 0, 0, false); NFSZERO_ATTRBIT(&attrbits); NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_LEASETIME); (void) nfsrv_putattrbit(nd, &attrbits); @@ -1166,7 +1170,8 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp int error, vers = NFS_VER2; nfsattrbit_t attrbits; - nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_GETATTR, nmp, fhp, fhlen, NULL, NULL, 0, 0, + false); if (nd->nd_flag & ND_NFSV4) { vers = NFS_VER4; NFSGETATTR_ATTRBIT(&attrbits); @@ -1734,8 +1739,13 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iom struct nfsrv_descript *nd = &nfsd; nfsattrbit_t attrbits; off_t tmp_off; + bool use_ext; KASSERT(uiop->uio_iovcnt == 1, ("nfs: writerpc iovcnt > 1")); + use_ext = false; + if ((NFSHASTLS(nmp) || nfs_use_ext_pgs) && + PMAP_HAS_DMAP != 0) + use_ext = true; *attrflagp = 0; tsiz = uio_uio_resid(uiop); tmp_off = uiop->uio_offset + tsiz; @@ -1751,7 +1761,8 @@ nfsrpc_writerpc(vnode_t vp, struct uio *uiop, int *iom while (tsiz > 0) { *attrflagp = 0; len = (tsiz > wsize) ? wsize : tsiz; - NFSCL_REQSTART(nd, NFSPROC_WRITE, vp); + nfscl_reqstart(nd, NFSPROC_WRITE, nmp, np->n_fhp->nfh_fh, + np->n_fhp->nfh_len, NULL, NULL, 0, 0, use_ext); if (nd->nd_flag & ND_NFSV4) { nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID); NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER+2*NFSX_UNSIGNED); @@ -4089,7 +4100,7 @@ nfsrpc_locku(struct nfsrv_descript *nd, struct nfsmoun int error; nfscl_reqstart(nd, NFSPROC_LOCKU, nmp, lp->nfsl_open->nfso_fh, - lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0); + lp->nfsl_open->nfso_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID + 6 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(type); *tl = txdr_unsigned(lp->nfsl_seqid); @@ -4141,7 +4152,8 @@ nfsrpc_lock(struct nfsrv_descript *nd, struct nfsmount uint8_t own[NFSV4CL_LOCKNAMELEN + NFSX_V4FHMAX]; struct nfsclsession *tsep; - nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0); + nfscl_reqstart(nd, NFSPROC_LOCK, nmp, nfhp, fhlen, NULL, NULL, 0, 0, + false); NFSM_BUILD(tl, u_int32_t *, 7 * NFSX_UNSIGNED); if (type == F_RDLCK) *tl++ = txdr_unsigned(NFSV4LOCKT_READ); @@ -4415,10 +4427,10 @@ nfsrpc_renew(struct nfsclclient *clp, struct nfsclds * return (0); if (dsp == NULL) nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); else nfscl_reqstart(nd, NFSPROC_RENEW, nmp, NULL, 0, NULL, - &dsp->nfsclds_sess, 0, 0); + &dsp->nfsclds_sess, 0, 0, false); if (!NFSHASNFSV4N(nmp)) { /* NFSv4.1 just uses a Sequence Op and not a Renew. */ NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); @@ -4465,11 +4477,11 @@ nfsrpc_rellockown(struct nfsmount *nmp, struct nfscllo if (NFSHASNFSV4N(nmp)) { /* For NFSv4.1, do a FreeStateID. */ nfscl_reqstart(nd, NFSPROC_FREESTATEID, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); nfsm_stateidtom(nd, &lp->nfsl_stateid, NFSSTATEID_PUTSTATEID); } else { nfscl_reqstart(nd, NFSPROC_RELEASELCKOWN, nmp, NULL, 0, NULL, - NULL, 0, 0); + NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, 2 * NFSX_UNSIGNED); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -4503,7 +4515,7 @@ nfsrpc_getdirpath(struct nfsmount *nmp, u_char *dirpat u_int32_t *opcntp; nfscl_reqstart(nd, NFSPROC_PUTROOTFH, nmp, NULL, 0, &opcntp, NULL, 0, - 0); + 0, false); cp = dirpath; cnt = 0; do { @@ -4570,7 +4582,7 @@ nfsrpc_delegreturn(struct nfscldeleg *dp, struct ucred int error; nfscl_reqstart(nd, NFSPROC_DELEGRETURN, nmp, dp->nfsdl_fh, - dp->nfsdl_fhlen, NULL, NULL, 0, 0); + dp->nfsdl_fhlen, NULL, NULL, 0, 0, false); NFSM_BUILD(tl, u_int32_t *, NFSX_STATEID); if (NFSHASNFSV4N(nmp)) *tl++ = 0; @@ -4683,7 +4695,7 @@ nfsrpc_exchangeid(struct nfsmount *nmp, struct nfsclcl if (minorvers == 0) minorvers = nmp->nm_minorvers; nfscl_reqstart(nd, NFSPROC_EXCHANGEID, nmp, NULL, 0, NULL, NULL, - NFS_VER4, minorvers); + NFS_VER4, minorvers, false); NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(nfsboottime.tv_sec); /* Client owner */ *tl = txdr_unsigned(clp->nfsc_rev); @@ -4779,7 +4791,7 @@ nfsrpc_createsession(struct nfsmount *nmp, struct nfsc else minorvers = NFSV41_MINORVERSION; nfscl_reqstart(nd, NFSPROC_CREATESESSION, nmp, NULL, 0, NULL, NULL, - NFS_VER4, minorvers); + NFS_VER4, minorvers, false); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); *tl++ = sep->nfsess_clientid.lval[0]; *tl++ = sep->nfsess_clientid.lval[1]; @@ -4906,7 +4918,7 @@ nfsrpc_destroysession(struct nfsmount *nmp, struct nfs struct nfsclsession *tsep; nfscl_reqstart(nd, NFSPROC_DESTROYSESSION, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_V4SESSIONID); tsep = nfsmnt_mdssession(nmp); bcopy(tsep->nfsess_sessionid, tl, NFSX_V4SESSIONID); @@ -4934,7 +4946,7 @@ nfsrpc_destroyclient(struct nfsmount *nmp, struct nfsc struct nfsclsession *tsep; nfscl_reqstart(nd, NFSPROC_DESTROYCLIENT, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, 2 * NFSX_UNSIGNED); tsep = nfsmnt_mdssession(nmp); *tl++ = tsep->nfsess_clientid.lval[0]; @@ -4963,7 +4975,7 @@ nfsrpc_layoutget(struct nfsmount *nmp, uint8_t *fhp, i int error; nfscl_reqstart(nd, NFSPROC_LAYOUTGET, nmp, fhp, fhlen, NULL, NULL, 0, - 0); + 0, false); nfsrv_setuplayoutget(nd, iomode, offset, len, minlen, stateidp, layouttype, layoutlen, 0); nd->nd_flag |= ND_USEGSSNAME; @@ -5007,7 +5019,7 @@ nfsrpc_getdeviceinfo(struct nfsmount *nmp, uint8_t *de ndi = NULL; gotdspp = NULL; nfscl_reqstart(nd, NFSPROC_GETDEVICEINFO, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_V4DEVICEID + 3 * NFSX_UNSIGNED); NFSBCOPY(deviceid, tl, NFSX_V4DEVICEID); tl += (NFSX_V4DEVICEID / NFSX_UNSIGNED); @@ -5228,7 +5240,7 @@ nfsrpc_layoutcommit(struct nfsmount *nmp, uint8_t *fh, int error; nfscl_reqstart(nd, NFSPROC_LAYOUTCOMMIT, nmp, fh, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED + 3 * NFSX_HYPER + NFSX_STATEID); txdr_hyper(off, tl); @@ -5279,7 +5291,7 @@ nfsrpc_layoutreturn(struct nfsmount *nmp, uint8_t *fh, int error; nfscl_reqstart(nd, NFSPROC_LAYOUTRETURN, nmp, fh, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 4 * NFSX_UNSIGNED); if (reclaim != 0) *tl++ = newnfs_true; @@ -5636,7 +5648,7 @@ nfsrpc_reclaimcomplete(struct nfsmount *nmp, struct uc int error; nfscl_reqstart(nd, NFSPROC_RECLAIMCOMPL, nmp, NULL, 0, NULL, NULL, 0, - 0); + 0, false); NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); *tl = newnfs_false; nd->nd_flag |= ND_USEGSSNAME; @@ -5784,7 +5796,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode iovbase = uiop->uio_iov->iov_base; iovlen = uiop->uio_iov->iov_len; - m = nfsm_uiombuflist(uiop, len, + m = nfsm_uiombuflist(0, 0, uiop, len, NULL, NULL); } tdrpc = drpc = malloc(sizeof(*drpc) * @@ -6227,7 +6239,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4state nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_READDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_readds: vers4 minvers=%d\n", minorvers); if (flex != 0) @@ -6236,7 +6249,8 @@ nfsrpc_readds(vnode_t vp, struct uio *uiop, nfsv4state nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSEQIDZERO); } else { nfscl_reqstart(nd, NFSPROC_READ, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_readds: vers3\n"); } NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED * 3); @@ -6301,7 +6315,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomo nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writeds: vers4 minvers=%d\n", minorvers); vers = NFS_VER4; if (flex != 0) @@ -6311,7 +6326,8 @@ nfsrpc_writeds(vnode_t vp, struct uio *uiop, int *iomo NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED); } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writeds: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6429,7 +6445,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_c nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_WRITEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers4 minvers=%d\n", minorvers); @@ -6437,7 +6454,8 @@ nfsrpc_writedsmir(vnode_t vp, int *iomode, int *must_c NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 2 * NFSX_UNSIGNED); } else { nfscl_reqstart(nd, NFSPROC_WRITE, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_writedsmir: vers3\n"); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + 3 * NFSX_UNSIGNED); } @@ -6658,11 +6676,13 @@ nfsrpc_commitds(vnode_t vp, uint64_t offset, int cnt, nd->nd_mrep = NULL; if (vers == 0 || vers == NFS_VER4) { nfscl_reqstart(nd, NFSPROC_COMMITDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; } else nfscl_reqstart(nd, NFSPROC_COMMIT, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); NFSCL_DEBUG(4, "nfsrpc_commitds: vers=%d minvers=%d\n", vers, minorvers); NFSM_BUILD(tl, uint32_t *, NFSX_HYPER + NFSX_UNSIGNED); @@ -6815,7 +6835,8 @@ nfsrpc_adviseds(vnode_t vp, uint64_t offset, int cnt, return (0); nd->nd_mrep = NULL; nfscl_reqstart(nd, NFSPROC_IOADVISEDS, nmp, fhp->nfh_fh, - fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers); + fhp->nfh_len, NULL, &dsp->nfsclds_sess, vers, minorvers, + false); vers = NFS_VER4; NFSCL_DEBUG(4, "nfsrpc_adviseds: vers=%d minvers=%d\n", vers, minorvers); @@ -7470,7 +7491,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, *dpp = NULL; *laystatp = ENXIO; nfscl_reqstart(nd, NFSPROC_OPENLAYGET, nmp, nfhp, fhlen, NULL, NULL, - 0, 0); + 0, 0, false); NFSM_BUILD(tl, uint32_t *, 5 * NFSX_UNSIGNED); *tl++ = txdr_unsigned(op->nfso_own->nfsow_seqid); *tl++ = txdr_unsigned(mode & NFSV4OPEN_ACCESSBOTH); @@ -8370,10 +8391,18 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct int error; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; + struct nfsmount *nmp = VFSTONFS(vnode_mount(vp)); nfsattrbit_t attrbits; + bool use_ext; *attrflagp = 0; - NFSCL_REQSTART(nd, NFSPROC_SETEXTATTR, vp); + use_ext = false; + if (uiop->uio_resid > MCLBYTES && (NFSHASTLS(nmp) || + nfs_use_ext_pgs) && PMAP_HAS_DMAP != 0) + use_ext = true; + nfscl_reqstart(nd, NFSPROC_SETEXTATTR, nmp, + VTONFS(vp)->n_fhp->nfh_fh, VTONFS(vp)->n_fhp->nfh_len, NULL, + NULL, 0, 0, use_ext); if (uiop->uio_resid > nd->nd_maxreq) { /* nd_maxreq is set by NFSCL_REQSTART(). */ mbuf_freem(nd->nd_mreq);