This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: Do we really need correct st_nlink count for directories?
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 24 Apr 2008 09:11:06 -0400
- Subject: Re: Do we really need correct st_nlink count for directories?
- References: <20080424114440.GA23852@calimero.vinschen.de>
- Reply-to: cygwin-developers at cygwin dot com
On Thu, Apr 24, 2008 at 01:44:40PM +0200, Corinna Vinschen wrote:
>Hi,
>
>As my subject already asks, do we really need correct st_nlink count for
>directories? Windows doesn't maintain a link count for directories, so
>Cygwin calls a function which evaluates st_nlink for directories by
>scanning the directory and counting all its subdirs. This is obviously
>time consuming. That's why we don't do it on remote drives at all.
>Given that we don't do it on remote drives, all tools must be able to
>deal with st_nlink == 1 for directories anyway. Which, for instance,
>all coreutils tools do. So, shouldn't we drop this time consuming
>subdir counting on local drives as well? It doesn't seem to fullfil
>any real need anymore, it's just a performance killer.
I thought find used it.
cgf