it is possible to detect non-posix filesystems during the dir tree traversal at opendir() and/or first readdir() time and disable the st_nlink optimization on a directory basis
the ast fts(3) does this mail the ast-users or ksh-integration lists for details -- Glenn Fowler -- AT&T Research, Florham Park NJ -- On Wed, 20 Aug 2008 09:40:03 +0200 Joerg.Schilling at fokus.fraunhofer.de (Joerg Schilling) wrote: > sfind implements the speed up _only_ on filesystems that are known to > implement st_nlink == num-subdirs + 2 ("ufs" and "zfs"). This behavior is > however present on more filesystems than "ufs" and "zfs" and for this reason, > sfind (being 100% POSIX compliant) is working correctly, but _not_ as fast > as possible on all possible filesystems. Examples where sfind could speed up > but currently can't are: "lofs" or "nfs" with underlying "ufs" or "zfs" and > "ISO-9660+Rock-Ridge" if the filesystem has been created by a recent mkisofs. > The Solaris "hsfs" implementation includes a test for "created by a recent > enought mkisofs". > For this reason, I proposed to implement a related pathconf() call to allow > to > test whether a specific filesystem implements st_nlink == num-subdirs + 2 in > a > related POSIX mailing list discussion a few years ago. > Let us see whether this is _really_ an Architecture review mailing list and we > are able to decide that Solaris has to implement this pathconf() call soon.... > If Solaris implements this call, POSIX will be able to include it in a future > version. > J?rg > -- > EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 > Berlin > js at cs.tu-berlin.de (uni) > schilling at fokus.fraunhofer.de (work) Blog: > http://schily.blogspot.com/ > URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily > _______________________________________________ > opensolaris-arc mailing list > opensolaris-arc at opensolaris.org