help-hurd
[Top][All Lists]
Advanced

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

Re: "find" doesn't work


From: Thomas Bushnell, BSG
Subject: Re: "find" doesn't work
Date: 14 Jun 2002 14:07:48 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

nisse@lysator.liu.se (Niels Möller) writes:

> 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.

I think it should always be exactly right.  That isn't *that* hard to
arrange, just list the directories and count names.

> 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.

That's not a good reason to systemically give a wrong answer.

The goal here is not just to make find work, but to provide useful
information in the correct way.



reply via email to

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