duplicate entries on ext3 when using readdir/readdir64

Thomas Trauner tt at it-austria.net
Fri Aug 1 14:00:31 UTC 2008

On Fri, 2008-08-01 at 08:16 -0400, Theodore Tso wrote:
> On Fri, Aug 01, 2008 at 11:43:40AM +0200, Thomas Trauner wrote:
> > 
> > I have a problem with directories that contain more than 10000 entries
> > (Ubuntu 8.04.1) or with more than 70000 entries (RHEL 5.2). If you use
> > readdir(3) or readdir64(3) you get one entry twice, with same name and
> > inode.
> > 
> How reproducible is this; can you reproduce it on this one filesystem?
> Can you reproduce it on multiple filesystems?  What sort of file names
> are you using?

Every time I tried. It is reproducible on the same filesystem, and also on other
systems with different filesystem sizes and usage patterns.
It showed up when on of our own script working through a Subversion directory failed.

File names are numbers, starting with "0" counting up.

> Also, are you testing by using "ls", or do you have your own program
> getting the names of the files.  If the latter, are you using
> telldir()/seekdir() in any way?

I'm testing with 'ls|sort -n|uniq -d' and also with a simple program
that simply counts how often readdir can be called.

> 						- Ted


More information about the Ext3-users mailing list