Subject: Re: getting rid of uvn_attach()
To: Antti Kantee <pooka@cs.hut.fi>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/17/2007 10:37:25
--1LKvkjL3sHcu1TtY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 17, 2007 at 03:55:04PM +0300, Antti Kantee wrote:
> I was discussing the use of VXLOCK in uvn_attach() with Chuck a while
> ago, and we agreed that it should go away.  Chuck suggested that the
> whole of uvn_attach() could go away, since all it really does is set
> the vnode's size.
>=20
> The following patch does away with uvn_attach().  Regular files have
> their size already set by file systems and the patch adds spec_mmap()
> for setting the size of device special files.
>=20
> The patch also adds a call to VOP_MMAP() along the exec path, since
> an implicit mmap is happening there.  I've been running it for quite a
> while now.
>=20
> comments?

Looks good. I've always hated what uvn_attach() was doing w/ VXLOCK, so=20
I'll be glad to see it go.

The one question I have is what keeps us from calling mmap on a character=
=20
device? AFAICT we are at the VOP layer, so I can open /dev/rwd0a and mmap=
=20
it, triggering a panic due to the assert.

Take care,

Bill

--1LKvkjL3sHcu1TtY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGnP5VWz+3JHUci9cRAnoxAKCEwwICqoLzqHN0sQfAwKUwb1sTzgCgghkh
/lP8awn8hJedVF4nH1gxGVY=
=mG/B
-----END PGP SIGNATURE-----

--1LKvkjL3sHcu1TtY--