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/24/2004 16:12:24
--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Mar 24, 2004 at 01:09:48PM +0900, YAMAMOTO Takashi wrote:
> hi,
>=20
> > Ok, for the sake of arguement, how do you propose we arrange to skip th=
e=20
> > lookup for "c" in general? Right now, the only code that knows about=20
> > tearing path names into components is in namei(9), so how do we get the=
=20
> > VOP_LOOKUP(c) to be skipped? Also, the right thing needs to happen for =
"rm=20
> > foo" too.
>=20
> "NOLEAF" flag for NDINIT?  (or, alternatively, "WANTLEAF")

NOLEAF might be it. Then we'd need to push (and document!) responsibility=
=20
for the mount-point crossing check into the file systems. A "check the=20
chace but don't build a vnode if there's a miss" type test would work.=20

> > Also, think about the case where / and /usr are separate file systems.=
=20
> > Right now sys_unlink() handles that case. If we push the vnode lookup i=
nto=20
> > the file system, they each have to try and get the vnode, to see if=20
> > there's a file system mounted above it.
>=20
> i think (dvp, name) pair is enough to check if it's a mount point or not
> in that case.  it isn't very pretty, though.

That is all that needs to be passed in, true. To me the question is how=20
much work are we trading? We'd save the VOP_LOOKUP() (which could be a big=
=20
deal), but we then have more complexity in each file system so they can do=
=20
the mount-point test themselves.

Take care,

Bill

--7JfCtLOvnd9MIVvH
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFAYiPoWz+3JHUci9cRAjz8AJ40x0y3xhK3QBIKRHjYFvOmohmMQwCgkA48
IWylQtp9dv0lLABXqmxp9HU=
=yEHF
-----END PGP SIGNATURE-----

--7JfCtLOvnd9MIVvH--