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/23/2004 10:53:50
hi,

> > nfs code already checks validity of negative caches by
> > checking the directory's ctime.  do you mean it isn't enough?
> 
> The nfs code actually makes a stat RPC each time? That seems inefficient. 
> Well, that sounds fine for LOOKUP.

not for each lookup because nfs_getattr also does caching.

> For RENAME or DELETE, it might be faster to just ignore the negative cache 
> and try the RPC. It would depend on which is faster, the lookup on the 
> server or the extra RPC. If the server itself is doing negative caching, 
> overall it's probably better to just do the RPC.

do you mean "just do a REMOVE rpc" ?
yes, i agree, if we can ignore "silly rename" things.

IMHO, eventually, VOP_REMOVE shouldn't take the vnode to be removed at all.
the directory vnode and the name is enough and each filesystem code can
deal with their issues.

YAMAMOTO Takashi