]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_repair: junk duplicate hashtab entries when processing sf dirents
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:26 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:12 +0000 (17:01 -0700)
commit27e6390054c4f250728b687421e3afd99e0695e5
tree17da0f329909f32c9e86b85428d941c97463077d
parenta0ea90f543fa0080bbbddeca49a272e9b99117f2
xfs_repair: junk duplicate hashtab entries when processing sf dirents

dir_hash_add() adds the passed-in dirent to the directory hashtab even
if there's already a duplicate.  Therefore, if we detect a duplicate or
a garbage entry while processing the a shortform directory's entries, we
need to junk the newly added entry, just like we do when processing
directory data blocks.

This will become particularly relevant in the next patch, where we
generate a master index of parent pointers from the non-junked hashtab
entries of each directory that phase6 scans.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
repair/phase6.c