From owner-freebsd-current@FreeBSD.ORG Wed Jun 8 19:06:10 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 362E916A41C for ; Wed, 8 Jun 2005 19:06:10 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7C53643D58 for ; Wed, 8 Jun 2005 19:06:09 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) by mail05.syd.optusnet.com.au (8.12.11/8.12.11) with ESMTP id j58J5xAo012330 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Thu, 9 Jun 2005 05:06:00 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1]) by cirb503493.alcatel.com.au (8.12.10/8.12.10) with ESMTP id j58J5xRx043134; Thu, 9 Jun 2005 05:05:59 +1000 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j58J5xXt043133; Thu, 9 Jun 2005 05:05:59 +1000 (EST) (envelope-from pjeremy) Date: Thu, 9 Jun 2005 05:05:58 +1000 From: Peter Jeremy To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: <20050608190558.GI39114@cirb503493.alcatel.com.au> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <861x7cls64.fsf@xps.des.no> User-Agent: Mutt/1.4.2i Cc: freebsd-current@freebsd.org Subject: Re: you are in an fs with millions of small files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jun 2005 19:06:10 -0000 On Wed, 2005-Jun-08 18:38:59 +0200, Dag-Erling Smørgrav wrote: >des@des.no (Dag-Erling Smørgrav) writes: >> Giorgos Keramidas 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