Subject: Re: ufs-ism in lookup(9)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 03/28/2004 14:27:18
--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Mar 27, 2004 at 03:47:58PM +0900, YAMAMOTO Takashi wrote:
> hi,
>=20
> > > How? We need the vnode itself (if there is one) to see if it's mounte=
d on.
> >=20
> > Let me rephrase that, as I now see I might have been unclear. I thought=
 a
> > big part of wanting VOP_REMOVE() to only take the directory and the name
> > component (not the vnode itself) was to save actually looking it up in
> > namei(9) - VOP_LOOKUP() would no longer have DELETE lookups. If we don't
> > have that vnode in the fs-indep code, though, how do we tell if there i=
s a
> > file system mounted on it?
>=20
> i think that mount(2) can remember the (dvp, name) pair so that
> it can be checked without the being removed vnode itself.

Hmmm... It could.

However that would mean that each mount point sits on two vnodes, one for=
=20
the node and one for the parent.

I'd rather either leave things as they are, or just put a cached-node=20
lookup in each file system + mount point check as part of the VOP_REMOVE()=
=20
code.

Also, is there any way NFS Exporting a file system could cause a mount=20
point to get renamed, thus invalidating the above cache?

Take care,

Bill

--PNTmBPCT7hxwcZjr
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFAZ1FGWz+3JHUci9cRAm2HAJ4xQCG1u1wCOONhnMffx1Tg72KAHQCdH7ei
bHCab+mDl6tTubJvUAykDOs=
=2a+h
-----END PGP SIGNATURE-----

--PNTmBPCT7hxwcZjr--