[OpenAFS-devel] stat bug?

Nickolai Zeldovich kolya@MIT.EDU
Tue, 21 Aug 2001 12:46:58 -0400


> what would be the right way to fix this?  tell find not to use optimizations
> or have afs return a 'more correct' link count?

GNU find has a flag exactly for this purpose (-noleaf).  Fixing it
would be nice, but right now the cache manager simply passes the
file server's LinkCount as nlink..  In order to get a more correct
link count it would have to FetchStatus every file in that directory
to count symlinks + directories (and then maybe readlink to be more
accurate..)

(I guess the fileserver could potentially keep such state, and use
one of the spares in AFSFetchStatus for this, but I haven't seen
this problem affect anything but GNU find, so doing this might be
overkill..)

-- kolya