From: Mark Lord Subject: Re: very poor ext3 write performance on big filesystems? Date: Tue, 19 Feb 2008 17:33:50 -0500 Message-ID: <47BB594E.1050103@rtr.ca> References: <47B980AC.2080806@wpkg.org> <20080218141640.GC12568@mit.edu> <47BB2008.6070202@rtr.ca> <47BB26CB.8010705@grupopie.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Theodore Tso , Andi Kleen , Tomasz Chmielewski , LKML , LKML To: Paulo Marques Return-path: Received: from rtr.ca ([76.10.145.34]:1032 "EHLO mail.rtr.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754919AbYBSWdw (ORCPT ); Tue, 19 Feb 2008 17:33:52 -0500 In-Reply-To: <47BB26CB.8010705@grupopie.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Paulo Marques wrote: > Mark Lord wrote: >> Theodore Tso wrote: >> .. >>> The following ld_preload can help in some cases. Mutt has this hack >>> encoded in for maildir directories, which helps. >> .. >> >> Oddly enough, that same spd_readdir() preload craps out here too >> when used with "rm -r" on largish directories. > > From looking at the code, I think I've found at least one bug in opendir: > ... >> dnew = realloc(dirstruct->dp, >> dirstruct->max * sizeof(struct dir_s)); > ... > > Shouldn't this be: "...*sizeof(struct dirent_s));"? .. Yeah, that's one bug. Another is that ->fd is frequently left uninitialized, yet later used. Fixing those didn't change the null pointer deaths, though.