[Top][All Lists]

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

Re: st_nlink of directory nodes in shadowfs

From: Thomas Bushnell, BSG
Subject: Re: st_nlink of directory nodes in shadowfs
Date: 27 Oct 2001 17:59:53 -0700
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Roland McGrath <roland@gnu.org> writes:

> Note, however, that this optimization in find will quite totally break the
> filesystem semantics presented by translators set on regular files.  That
> is, a translator set on a regular file may well report S_IFDIR and so a
> find ought to treat it as a directory.  But the underlying node isn't a
> directory and so doesn't have a .. node contributing to the containing
> directory's link count.

This is a realy problem with find, and we should report it.
(Actually, we should try and provide a patch.)

It opens a question: do we want the decision to hinge on whether
S_IFDIR is returned?  The other thing is to test on whether it really
is a subdir.  (Note that my earlier note about st_nlink is about
subdirs, S_IFDIR.)

A real subdir, of course, is one that supports directory operations.  

Perhaps find should support both versions, and should have a user
option to say which.  (That is, it being find, it should have
predicates to detect which, and then a sane default.)  It begs the
question of "what is the default", but whatever it is, it should be
the same as is used by things like chmod -R and so forth.

I'm inclined to say the default should be to work on all real subdirs,
whether they label themselves with S_IFDIR or not.


reply via email to

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