help-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "find" doesn't work


From: Niels Möller
Subject: Re: "find" doesn't work
Date: 14 Jun 2002 22:24:38 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

tb@becket.net (Thomas Bushnell, BSG) writes:

> Hurd directory servers are required to provide the correct st_nlink
> value, which is always the number of subdirs, plus two.

Must it be exactly right, or is it ok with a value that is slightly
larger? More precisely, it seems like the easiest way to get a
reasonable st_nlink field in shadowfs is to add up the st_nlink fields
of the corresponding underlying directories, adjusting for the ±2 terms.

Then you will get the correct value + the number of files that are
actually shadowing each other.

If a process that traverses the tree finds that readdir returns fewer
entries than st_nlink of a previous stat indicates, it can't know if
that's because stat lied or because some files were unlinked under its
feet.

/Niels



reply via email to

[Prev in Thread] Current Thread [Next in Thread]