Date: Sat, 1 Aug 2020 02:21:21 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r363749 - in projects/nfs-over-tls/sys/fs: nfs nfsclient nfsserver Message-ID: <202008010221.0712LLoo082271@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Sat Aug 1 02:21:20 2020 New Revision: 363749 URL: https://svnweb.freebsd.org/changeset/base/363749 Log: Minor cleanups to bring the code closer to what is in head. Modified: projects/nfs-over-tls/sys/fs/nfs/nfs_commonkrpc.c projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c Modified: projects/nfs-over-tls/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfs/nfs_commonkrpc.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfs/nfs_commonkrpc.c Sat Aug 1 02:21:20 2020 (r363749) @@ -897,7 +897,7 @@ tryagain: */ newnfs_realign(&nd->nd_mrep, M_WAITOK); nd->nd_md = nd->nd_mrep; - nd->nd_dpos = mtod(nd->nd_md, char *); + nd->nd_dpos = mtod(nd->nd_md, caddr_t); nd->nd_repstat = 0; if (nd->nd_procnum != NFSPROC_NULL && nd->nd_procnum != NFSV4PROC_CBNULL) { Modified: projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c Sat Aug 1 02:21:20 2020 (r363749) @@ -4845,8 +4845,7 @@ nfsv4_findmirror(struct nfsmount *nmp) } /* - * Fill in the fields of "struct nfsrv_descript" for a new ext_pgs mbuf. - * The build argument is true for build and false for dissect. + * Fill in the fields of "struct nfsrv_descript". */ void nfsm_set(struct nfsrv_descript *nd, u_int offs) Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c Sat Aug 1 02:21:20 2020 (r363749) @@ -93,8 +93,7 @@ printf("cbprogram proc=%d\n", rqst->rq_proc); rqst->rq_args = NULL; newnfs_realign(&nd.nd_mrep, M_WAITOK); nd.nd_md = nd.nd_mrep; -printf("cbreq nd_md=%p\n", nd.nd_md); - nd.nd_dpos = mtod(nd.nd_md, char *); + nd.nd_dpos = mtod(nd.nd_md, caddr_t); nd.nd_nam = svc_getrpccaller(rqst); nd.nd_nam2 = rqst->rq_addr; nd.nd_mreq = NULL; Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clrpcops.c Sat Aug 1 02:21:20 2020 (r363749) @@ -1810,8 +1810,7 @@ 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, nmp, np->n_fhp->nfh_fh, - np->n_fhp->nfh_len, NULL, NULL, 0, 0, false); + NFSCL_REQSTART(nd, NFSPROC_WRITE, vp); if (nd->nd_flag & ND_NFSV4) { nfsm_stateidtom(nd, stateidp, NFSSTATEID_PUTSTATEID); NFSM_BUILD(tl, u_int32_t *, NFSX_HYPER+2*NFSX_UNSIGNED); @@ -8464,17 +8463,10 @@ nfsrpc_setextattr(vnode_t vp, const char *name, struct int error; struct nfsrv_descript nfsd; struct nfsrv_descript *nd = &nfsd; - struct nfsmount *nmp = VFSTONFS(vp->v_mount); nfsattrbit_t attrbits; - bool use_ext; *attrflagp = 0; - use_ext = false; - if (uiop->uio_resid > MCLBYTES && NFSHASTLS(nmp)) - 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); + NFSCL_REQSTART(nd, NFSPROC_SETEXTATTR, vp); if (uiop->uio_resid > nd->nd_maxreq) { /* nd_maxreq is set by NFSCL_REQSTART(). */ m_freem(nd->nd_mreq); Modified: projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c Sat Aug 1 02:21:20 2020 (r363749) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #include <nlm/nlm_prot.h> #include <nlm/nlm.h> -#include <rpc/rpcsec_tls.h> FEATURE(nfsd, "NFSv4 server"); @@ -3281,7 +3280,7 @@ nfsd_fhtovp(struct nfsrv_descript *nd, struct nfsrvfh if (!nd->nd_repstat && exp->nes_exflag == 0 && !(nd->nd_flag & ND_NFSV4)) { vput(*vpp); - nd->nd_repstat = NFSERR_ACCES; + nd->nd_repstat = EACCES; } /* @@ -5264,8 +5263,6 @@ nfsrv_writedsdorpc(struct nfsmount *nmp, fhandle_t *fh /* Put data in mbuf chain. */ nd->nd_mb->m_next = m; - if ((m->m_flags & M_EXTPG) != 0) - nd->nd_flag |= ND_EXTPG; /* Set nd_mb and nd_bpos to end of data. */ while (m->m_next != NULL) Modified: projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c Fri Jul 31 23:35:49 2020 (r363748) +++ projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c Sat Aug 1 02:21:20 2020 (r363749) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include <fs/nfs/nfsport.h> #include <sys/extattr.h> #include <sys/filio.h> -#include <rpc/rpcsec_tls.h> /* Global vars */ extern u_int32_t newnfs_false, newnfs_true;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008010221.0712LLoo082271>