duplicate entries on ext3 when using readdir/readdir64
Eric Sandeen
sandeen at redhat.com
Fri Aug 1 14:47:07 UTC 2008
Thomas Trauner wrote:
> 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.
>
Hm, a bog-simple test here doesn't show any trouble:
[root at inode dirtest]# for I in `seq 0 10500`; do touch $I; done
[root at inode dirtest]# ls | sort -n | uniq -d
[root at inode dirtest]# ls | wc -l
10501
does that reflect what you're doing? Do you have a testcase you can share?
-Eric
More information about the Ext3-users
mailing list