you are in an fs with millions of small files
Peter Jeremy
PeterJeremy at optushome.com.au
Wed Jun 8 19:06:10 GMT 2005
On Wed, 2005-Jun-08 18:38:59 +0200, Dag-Erling Smørgrav wrote:
>des at des.no (Dag-Erling Smørgrav) writes:
>> Giorgos Keramidas <keramida at freebsd.org> writes:
>> > This would require updates/changes to all the users of fts.h too?
>> No. They access the list through fts_next().
>
>ARRRGH! They're supposed to, but of course some don't: ls(1), ctm(1)
>and mtree(8).
Why 'ARRRGH!'? fts(3) documents the use of fts_children() to allow
the list to be traversed using fts_link. Converting from a tree to a
linked list is not rocket-science - fts_next() has to do an ordered
traversal. At the most simplistic level, all you need to do is
iterate fts_next() and turn the output into a list in fts_link.
--
Peter Jeremy
More information about the freebsd-current
mailing list