Subject: Re: M_READONLY
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-net
Date: 09/20/2004 14:52:21
--Apple-Mail-6--701658716
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Sep 20, 2004, at 12:57 PM, YAMAMOTO Takashi wrote:

> i think that checking M_EXT_ROMAP is enough for loaned buffers
> because they're read-only mapped in kernel.

For loaned buffers, I agree.  But I'm talking about buffers that might 
not necessarily be loaned in the traditional sense.

Doesn't the NFS code attach the contents of a struct buf to an mbuf to 
achieve zero-copy sends?  The contents of that struct buf should really 
not be modified, but your patch would make the mbuf code assume that it 
can be.

> if it isn't enough (although there's currently no case i can think of),
> we can introduce a new flag, say, M_EXT_READONLY.

I would say that the existing behavior should remain, and non-cluster 
external storage that is R/W'able should explicitly set an M_EXT_RW 
bit.

         -- Jason R. Thorpe <thorpej@shagadelic.org>


--Apple-Mail-6--701658716
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFBT1EVOpVKkaBm8XkRArCzAJwIAS0jJObfkHfpWNqDdGORre5QrgCcC3Fe
ta/usTUjGK/xa/s51fzBIGw=
=JOMF
-----END PGP SIGNATURE-----

--Apple-Mail-6--701658716--