Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jun 2005 05:05:58 +1000
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= <des@des.no>
Cc:        freebsd-current@freebsd.org
Subject:   Re: you are in an fs with millions of small files
Message-ID:  <20050608190558.GI39114@cirb503493.alcatel.com.au>
In-Reply-To: <861x7cls64.fsf@xps.des.no>
References:  <42A4D5D0.9040500@elischer.org> <42A59367.6060307@centtech.com> <20050607175242.D61131@fledge.watson.org> <86ll5lmhs3.fsf@xps.des.no> <20050608074613.GA979@orion.daedalusnetworks.priv> <86zmu1l223.fsf@xps.des.no> <20050608080304.GB1226@orion.daedalusnetworks.priv> <20050608082727.GA23674@orion.daedalusnetworks.priv> <86vf4olsdm.fsf@xps.des.no> <861x7cls64.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2005-Jun-08 18:38:59 +0200, Dag-Erling Smørgrav wrote:
>des@des.no (Dag-Erling Smørgrav) writes:
>> Giorgos Keramidas <keramida@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050608190558.GI39114>