Subject: M_READONLY
To: None <tech-net@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-net
Date: 09/20/2004 23:46:22
hi,

i'd like to change M_READONLY like the following.
there's no point to protect external storage if it isn't shared.
eg. receive buffers for jumbo frame.

YAMAMOTO Takashi

Index: mbuf.h
===================================================================
--- mbuf.h	(revision 878)
+++ mbuf.h	(working copy)
@@ -636,12 +636,11 @@ do {									\
 
 /*
  * Determine if an mbuf's data area is read-only.  This is true
- * for non-cluster external storage and for clusters that are
- * being referenced by more than one mbuf.
+ * if external storage is read-only mapped or referenced by more than one mbuf.
  */
 #define	M_READONLY(m)							\
 	(((m)->m_flags & M_EXT) != 0 &&					\
-	  (((m)->m_flags & M_CLUSTER) == 0 || MCLISREFERENCED(m)))
+	  (((m)->m_flags & M_EXT_ROMAP) != 0 || MCLISREFERENCED(m)))
 
 /*
  * Determine if an mbuf's data area is read-only at the MMU.