svn commit: r361815 - in projects/nfs-over-tls/sys/fs: nfs nfsclient nfsserver

Rick Macklem rmacklem at FreeBSD.org
Fri Jun 5 01:44:35 UTC 2020


Author: rmacklem
Date: Fri Jun  5 01:44:33 2020
New Revision: 361815
URL: https://svnweb.freebsd.org/changeset/base/361815

Log:
  Since M_NOMAP is now renamed to M_EXTPG, rename ND_NOMAP to ND_EXTPG for
  consistency.
  
  There is no semantic change done by this patch.

Modified:
  projects/nfs-over-tls/sys/fs/nfs/nfs.h
  projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c
  projects/nfs-over-tls/sys/fs/nfs/nfsm_subs.h
  projects/nfs-over-tls/sys/fs/nfsclient/nfs_clcomsubs.c
  projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.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.h
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfs/nfs.h	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfs/nfs.h	Fri Jun  5 01:44:33 2020	(r361815)
@@ -714,7 +714,7 @@ struct nfsrv_descript {
 #define	ND_SAVEDCURSTATEID	0x100000000
 #define	ND_HASSLOTID		0x200000000
 #define	ND_NFSV42		0x400000000
-#define	ND_NOMAP		0x800000000
+#define	ND_EXTPG		0x800000000
 #define	ND_TLS			0x1000000000
 #define	ND_TLSCERT		0x2000000000
 #define	ND_TLSCERTUSER		0x4000000000

Modified: projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfs/nfs_commonsubs.c	Fri Jun  5 01:44:33 2020	(r361815)
@@ -363,7 +363,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum,
 	nd->nd_repstat = 0;
 	nd->nd_maxextsiz = 16384;
 	if (use_ext && PMAP_HAS_DMAP != 0) {
-		nd->nd_flag |= ND_NOMAP;
+		nd->nd_flag |= ND_EXTPG;
 #ifdef KERN_TLS
 		if (rpctls_getinfo(&maxlen))
 			nd->nd_maxextsiz = min(TLS_MAX_MSG_SIZE_V10_2,
@@ -374,7 +374,7 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum,
 	/*
 	 * Get the first mbuf for the request.
 	 */
-	if ((nd->nd_flag & ND_NOMAP) != 0) {
+	if ((nd->nd_flag & ND_EXTPG) != 0) {
 		mb = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK,
 		    mb_free_mext_pgs);
 		nd->nd_mreq = nd->nd_mb = mb;
@@ -846,22 +846,22 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp,
 	bytesize = NFSX_UNSIGNED + siz + rem;
 	m2 = nd->nd_mb;
 	cp2 = nd->nd_bpos;
-	if ((nd->nd_flag & ND_NOMAP) != 0)
+	if ((nd->nd_flag & ND_EXTPG) != 0)
 		left = nd->nd_bextpgsiz;
 	else
 		left = M_TRAILINGSPACE(m2);
 
 	KASSERT(((m2->m_flags & (M_EXT | M_EXTPG)) ==
-	    (M_EXT | M_EXTPG) && (nd->nd_flag & ND_NOMAP) != 0) ||
+	    (M_EXT | M_EXTPG) && (nd->nd_flag & ND_EXTPG) != 0) ||
 	    ((m2->m_flags & (M_EXT | M_EXTPG)) !=
-	    (M_EXT | M_EXTPG) && (nd->nd_flag & ND_NOMAP) == 0),
+	    (M_EXT | M_EXTPG) && (nd->nd_flag & ND_EXTPG) == 0),
 	    ("nfsm_strtom: ext_pgs and non-ext_pgs mbufs mixed"));
 	/*
 	 * Loop around copying the string to mbuf(s).
 	 */
 	while (siz > 0) {
 		if (left == 0) {
-			if ((nd->nd_flag & ND_NOMAP) != 0) {
+			if ((nd->nd_flag & ND_EXTPG) != 0) {
 				m2 = nfsm_add_ext_pgs(m2,
 				    nd->nd_maxextsiz, &nd->nd_bextpg);
 				cp2 = (char *)(void *)PHYS_TO_DMAP(
@@ -889,7 +889,7 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp,
 		m2->m_len += xfer;
 		siz -= xfer;
 		left -= xfer;
-		if ((nd->nd_flag & ND_NOMAP) != 0) {
+		if ((nd->nd_flag & ND_EXTPG) != 0) {
 			nd->nd_bextpgsiz -= xfer;
 			m2->m_epg_last_len += xfer;
 		}
@@ -899,14 +899,14 @@ nfsm_strtom(struct nfsrv_descript *nd, const char *cp,
 			NFSBZERO(cp2, rem);
 			m2->m_len += rem;
 			cp2 += rem;
-			if ((nd->nd_flag & ND_NOMAP) != 0) {
+			if ((nd->nd_flag & ND_EXTPG) != 0) {
 				nd->nd_bextpgsiz -= rem;
 				m2->m_epg_last_len += rem;
 			}
 		}
 	}
 	nd->nd_mb = m2;
-	if ((nd->nd_flag & ND_NOMAP) != 0)
+	if ((nd->nd_flag & ND_EXTPG) != 0)
 		nd->nd_bpos = cp2;
 	else
 		nd->nd_bpos = mtod(m2, char *) + m2->m_len;
@@ -4464,7 +4464,7 @@ nfsrvd_rephead(struct nfsrv_descript *nd)
 {
 	struct mbuf *mreq;
 
-	if ((nd->nd_flag & ND_NOMAP) != 0) {
+	if ((nd->nd_flag & ND_EXTPG) != 0) {
 		mreq = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK,
 		    mb_free_mext_pgs);
 		nd->nd_mreq = nd->nd_mb = mreq;

Modified: projects/nfs-over-tls/sys/fs/nfs/nfsm_subs.h
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfs/nfsm_subs.h	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfs/nfsm_subs.h	Fri Jun  5 01:44:33 2020	(r361815)
@@ -64,7 +64,7 @@ nfsm_build(struct nfsrv_descript *nd, int siz)
 	void *retp;
 	struct mbuf *mb2;
 
-	if ((nd->nd_flag & ND_NOMAP) == 0 &&
+	if ((nd->nd_flag & ND_EXTPG) == 0 &&
 	    siz > M_TRAILINGSPACE(nd->nd_mb)) {
 		NFSMCLGET(mb2, M_NOWAIT);
 		if (siz > MLEN)
@@ -73,7 +73,7 @@ nfsm_build(struct nfsrv_descript *nd, int siz)
 		nd->nd_bpos = mtod(mb2, char *);
 		nd->nd_mb->m_next = mb2;
 		nd->nd_mb = mb2;
-	} else if ((nd->nd_flag & ND_NOMAP) != 0) {
+	} else if ((nd->nd_flag & ND_EXTPG) != 0) {
 		if (siz > nd->nd_bextpgsiz) {
 			mb2 = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK,
 			    mb_free_mext_pgs);

Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clcomsubs.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clcomsubs.c	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clcomsubs.c	Fri Jun  5 01:44:33 2020	(r361815)
@@ -80,12 +80,12 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui
 			left = siz;
 		uiosiz = left;
 		while (left > 0) {
-			if ((nd->nd_flag & ND_NOMAP) != 0)
+			if ((nd->nd_flag & ND_EXTPG) != 0)
 				mlen = nd->nd_bextpgsiz;
 			else
 				mlen = M_TRAILINGSPACE(mp);
 			if (mlen == 0) {
-				if ((nd->nd_flag & ND_NOMAP) != 0) {
+				if ((nd->nd_flag & ND_EXTPG) != 0) {
 					mp = nfsm_add_ext_pgs(mp,
 					    nd->nd_maxextsiz, &nd->nd_bextpg);
 					mcp = (char *)(void *)PHYS_TO_DMAP(
@@ -112,7 +112,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui
 			left -= xfer;
 			uiocp += xfer;
 			mcp += xfer;
-			if ((nd->nd_flag & ND_NOMAP) != 0) {
+			if ((nd->nd_flag & ND_EXTPG) != 0) {
 				nd->nd_bextpgsiz -= xfer;
 				mp->m_epg_last_len += xfer;
 			}
@@ -126,13 +126,13 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui
 		siz -= uiosiz;
 	}
 	if (rem > 0) {
-		if ((nd->nd_flag & ND_NOMAP) == 0 && rem >
+		if ((nd->nd_flag & ND_EXTPG) == 0 && rem >
 		    M_TRAILINGSPACE(mp)) {
 			NFSMGET(mp);
 			mp->m_len = 0;
 			mp2->m_next = mp;
 			mcp = mtod(mp, char *);
-		} else if ((nd->nd_flag & ND_NOMAP) != 0 && rem >
+		} else if ((nd->nd_flag & ND_EXTPG) != 0 && rem >
 		    nd->nd_bextpgsiz) {
 			mp = nfsm_add_ext_pgs(mp, nd->nd_maxextsiz,
 			    &nd->nd_bextpg);
@@ -144,7 +144,7 @@ nfsm_uiombuf(struct nfsrv_descript *nd, struct uio *ui
 			*mcp++ = '\0';
 		mp->m_len += rem;
 		nd->nd_bpos = mcp;
-		if ((nd->nd_flag & ND_NOMAP) != 0) {
+		if ((nd->nd_flag & ND_EXTPG) != 0) {
 			nd->nd_bextpgsiz -= rem;
 			mp->m_epg_last_len += rem;
 		}

Modified: projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfsclient/nfs_clkrpc.c	Fri Jun  5 01:44:33 2020	(r361815)
@@ -118,7 +118,7 @@ printf("cbreq nd_md=%p\n", nd.nd_md);
 #endif
 		if (((xprt->xp_tls & RPCTLS_FLAGS_HANDSHAKE) != 0 ||
 		    nfs_use_ext_pgs) && PMAP_HAS_DMAP != 0) {
-			nd.nd_flag |= ND_NOMAP;
+			nd.nd_flag |= ND_EXTPG;
 			nd.nd_maxextsiz = 16384;
 #ifdef KERN_TLS
 			if ((xprt->xp_tls & RPCTLS_FLAGS_HANDSHAKE) != 0 &&

Modified: projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdport.c	Fri Jun  5 01:44:33 2020	(r361815)
@@ -5181,7 +5181,7 @@ 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_NOMAP;
+		nd->nd_flag |= ND_EXTPG;
 
 	/* Set nd_mb and nd_bpos to end of data. */
 	while (m->m_next != NULL)
@@ -6278,9 +6278,9 @@ nfsvno_getxattr(struct vnode *vp, char *name, uint32_t
 	/*
 	 * If the cnt is larger than MCLBYTES, use ext_pgs if
 	 * possible.
-	 * Always use ext_pgs if ND_NOMAP is set.
+	 * Always use ext_pgs if ND_EXTPG is set.
 	 */
-	if ((flag & ND_NOMAP) != 0 || (tlen > MCLBYTES &&
+	if ((flag & ND_EXTPG) != 0 || (tlen > MCLBYTES &&
 	    PMAP_HAS_DMAP != 0 && ((flag & ND_TLS) != 0 || nfs_use_ext_pgs)))
 		uiop->uio_iovcnt = nfsrv_createiovec_extpgs(tlen, maxextsiz,
 		    &m, &m2, &iv);

Modified: projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c
==============================================================================
--- projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Jun  5 01:00:55 2020	(r361814)
+++ projects/nfs-over-tls/sys/fs/nfsserver/nfs_nfsdserv.c	Fri Jun  5 01:44:33 2020	(r361815)
@@ -681,7 +681,7 @@ nfsrvd_readlink(struct nfsrv_descript *nd, __unused in
 			nd->nd_repstat = EINVAL;
 	}
 	if (nd->nd_repstat == 0) {
-		if ((nd->nd_flag & ND_NOMAP) != 0)
+		if ((nd->nd_flag & ND_EXTPG) != 0)
 			nd->nd_repstat = nfsvno_readlink(vp, nd->nd_cred,
 			    nd->nd_maxextsiz, p, &mp, &mpend, &len);
 		else
@@ -859,9 +859,9 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int is
 		/*
 		 * If the cnt is larger than MCLBYTES, use ext_pgs if
 		 * possible.
-		 * Always use ext_pgs if ND_NOMAP is set.
+		 * Always use ext_pgs if ND_EXTPG is set.
 		 */
-		if ((nd->nd_flag & ND_NOMAP) != 0 || (PMAP_HAS_DMAP != 0 &&
+		if ((nd->nd_flag & ND_EXTPG) != 0 || (PMAP_HAS_DMAP != 0 &&
 		    ((nd->nd_flag & ND_TLS) != 0 || (nfs_use_ext_pgs &&
 		    cnt > MCLBYTES))))
 			nd->nd_repstat = nfsvno_read(vp, off, cnt, nd->nd_cred,
@@ -904,7 +904,7 @@ nfsrvd_read(struct nfsrv_descript *nd, __unused int is
 		nd->nd_mb->m_next = m3;
 		nd->nd_mb = m2;
 		if ((m2->m_flags & M_EXTPG) != 0) {
-			nd->nd_flag |= ND_NOMAP;
+			nd->nd_flag |= ND_EXTPG;
 			nd->nd_bextpg = m2->m_epg_npgs - 1;
 			nd->nd_bpos = (char *)(void *)
 			    PHYS_TO_DMAP(m2->m_epg_pa[nd->nd_bextpg]);
@@ -5608,7 +5608,7 @@ nfsrvd_getxattr(struct nfsrv_descript *nd, __unused in
 			nd->nd_mb->m_next = mp;
 			nd->nd_mb = mpend;
 			if ((mpend->m_flags & M_EXTPG) != 0) {
-				nd->nd_flag |= ND_NOMAP;
+				nd->nd_flag |= ND_EXTPG;
 				nd->nd_bextpg = mpend->m_epg_npgs - 1;
 				nd->nd_bpos = (char *)(void *)
 				   PHYS_TO_DMAP(mpend->m_epg_pa[nd->nd_bextpg]);


More information about the svn-src-projects mailing list