Subject: Re: ufs-ism in lookup(9)
To: None <jdolecek@NetBSD.org>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 03/20/2004 17:03:33
> > however, due to this, our nfs client issues LOOKUP rpcs which isn't
> > really needed in the most cases.
>
> You surely need to do lookup before deleting a file - you are
> supposed to return ENOENT if it doesn't exist. docache only
> controls whether the last element is saved to cache, not
> if cache is used during the lookup. AFAICS you really
> don't want to put entry with DELETE op to cache - it will
> be removed soon anyway.
>
> Jaromir
i think that you misunderstand how it works.
please read cache_lookup().
if MAKEENTRY is not specified, it removes the entry and return -1
so that non-cached lookup is performed. it's needed for ufs because
ufs_lookup stores infomations into the in-core inode and following
ufs_remove uses them.
YAMAMOTO Takashi