Thomas Trauner
2008-Aug-01 09:43 UTC
duplicate entries on ext3 when using readdir/readdir64
Hello, 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. Some analyzing showed that disabling dir_index solves this problem, but I think that this is a bug in the ext3 code, as no other file-system shows this behavior. I've found the following regarding this bug, but nothing about whether if it is fixed nor if a back-port for older 2.6 kernels exists. <https://www.redhat.com/archives/ext3-users/2007-December/msg00004.html> and <http://episteme.arstechnica.com/eve/forums/a/tpc/f/96509133/m/199007643931?r=494000843931#494000843931> On linux-fsdevel I've found the following, but they delete directory entries in between multiple readdir calls. <http://kerneltrap.org/mailarchive/linux-fsdevel/2005/9/15/310258> Does anyone know where I could find more information or report this bug? Thanks in advance! Regards. Tom Trauner
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? 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? - Ted