https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082022-06-05T19:35:06ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #3316: hammer2_dirent_create() allows creating >1 dirents with the same namehttps://bugs.dragonflybsd.org/issues/3316?journal_id=143602022-06-05T19:35:06Zdillon
<ul></ul><p>The directory hash collision space does not guarantee name uniqueness, so the iterator is there on purpose to deal with hash collisions (names might be different, but key calculates to the same value). Higher levels are responsible for ensuring that name duplication is disallowed.</p>
<p>There is a second reason here too... even though it isn't in the filesystem (yet), the multi-master quorum algorithm has to be able to synchronize valid entries even in the presence of invalid entries, so it is possible for two entries to exist on the media for the same filename where one has quorum and the other does not. Temporarily (the one without quorum would eventually be deleted).</p>
<p>So I don't think this is a bug per-say.</p>
<p>-Matt</p>