Re: duplicate entries on ext3 when using readdir/readdir64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 04, 2008 at 09:48:39AM +0200, Thomas Trauner wrote:
> Yes, but I've written incorrect values, sorry. It's a little bit higher,
> a run of my program outputs this on 2.6.24-19-generic (ubuntu 8.04.1):
> 
> expected 11778 files, but readdir reports 11779
> expected 11862 files, but readdir64 reports 11863
> 
> And on 2.6.18-92.1.6.el5 (rhel 5.2):
> expected 72922 files, but readdir reports 72923
> expected 73131 files, but readdir64 reports 73132

BTW, I doubt the difference in what you had on your Ubuntu and RHEL
system has anything to do with the kernel version or the distribution,
but just the luck of the draw.  If you run "dumpe2fs -h /dev/sdXX |
grep "Hash Seed" from both systms, and then take that uuid and feed it
to the tst_hash program via the -s option, you'll probably see it was
simply the different directory hash seed which is changing when the
first collision happened:

%./tst_hash -s 27e0ed94-069c-44c0-bea0-044b1a8d7bcc 
hash collision: 142886, 142987: 7104d654:131c0700
hash collision: 188030, 188131: aefe1dc2:f7517103
hash collision: 14020, 14031: fc717efa:87ce3eaa
hash collision: 120336, 120732: 34c3f1b6:cee72d50
4 collisions

vs.

% ./tst_hash -s 7089e459-07c2-43cc-b25f-bafdcce9cd05
hash collision: 167469, 167568: 4de08834:3fa2a17a
hash collision: 133356, 133752: ce1bfd8e:a1bce824
hash collision: 179218, 179319: ea71d5c8:43471df9
hash collision: 111503, 111701: fbfcea6c:760591e8
hash collision: 134034, 134135: 0ff24a86:f627f5a1
hash collision: 252452, 252553: 6631082a:43adb3f4
hash collision: 101107, 101305: a1a99e86:8d50e974
hash collision: 62302, 62313: 2689a56c:38ccd31d
hash collision: 60242, 60253: d9e3f444:f252b5f5
9 collisions

With the first hash seed, the first collision happened with the
filenames 14020 and 14031.  With the second hash seed, you don't get a
collision until 60242 and 60253.

Regards,

						- Ted

_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux