We recently ran across a situation where we saw two directory entries
that were exactly the same. A ls -li of the directory in question shows
the following:
3758898162 -rw-r--r-- 1 root root 1592 Jan 28 02:21
4b13e98d-2165-4630-851d-c2d94149401f.i
3758898162 -rw-r--r-- 1 root root 1592 Jan 28 02:21
4b13e98d-2165-4630-851d-c2d94149401f.i
3758901942 -rw-r--r-- 1 root root 1805 Mar 16 21:43
848a74ed-ec3a-4504-a478-6b75cede7ccc.i
There are only three entries in the directory. Note that the first two
are identical - same name, same inode number. Note, too, that the inode
has a link count of *one* despite its having two directory entries
pointing at it.
When I run xfs_db and examine this directory, I see that this is a
short-form dir2 directory in the inode literal area, and it is the first
two entries that are identical. I searched the archives and found a
similar situation described in 2006, but no resolution. The xfs_db
inode dump is below... any thoughts as to how this happens and is there
a fix?