Subject: Re: NAMECACHE_ENTER_REVERSE (Re: CVS commit: src/sys/kern)
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 12/01/2006 05:28:11
> >> because
> > - name cache is optional.
> So file systems that don't use it lose.  I'm fine with that :-)

i'm not sure if i like that.
if we want to make it mandatory, it should be done in the upper layer,
rather than filesystem themselves.

> > - nfs often evicts its cache entries.
> For what reason?

to avoid using stale entries.
actually, it isn't a nfs-specific property.  each filesystems are
free to remove its entries.  eg. even cache_lookup() itself removes entries.

% ls -l /proc/$$/exe
lr-xr-xr-x  1 root  wheel  16 Dec  1 05:13 /proc/73/exe@ -> /usr/pkg/bin/zsh
% rm -f /usr/pkg/bin/zsh
rm: /usr/pkg/bin/zsh: Permission denied
% ls -l /proc/$$/exe
lr-xr-xr-x  1 root  wheel  1 Dec  1 05:13 /proc/73/exe@ -> /

maybe we can mark entries stale and keep them for pathname requests.
but it seems like a hack for me.