Subject: Re: ufs-ism in lookup(9)
To: None <wrstuden@netbsd.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/27/2004 15:47:58
hi,

> > > > That is all that needs to be passed in, true. To me the question is how 
> > > > much work are we trading? We'd save the VOP_LOOKUP() (which could be a big
>  
> > > > deal), but we then have more complexity in each file system so they can do
>  
> > > > the mount-point test themselves.
> > > 
> > > what i meant is, filesystem independent code can do the test
> > > before calling VOP_REMOVE.
> > 
> > How? We need the vnode itself (if there is one) to see if it's mounted on.
> 
> 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 is a
> file system mounted on it?

i think that mount(2) can remember the (dvp, name) pair so that
it can be checked without the being removed vnode itself.

YAMAMOTO Takashi