xfs: use the directory name hash function for dir scrubbing
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:16 +0000 (19:00 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 12 Apr 2023 02:00:16 +0000 (19:00 -0700)
commit9dceccc5822f2ecea12a89f24d7cad1f3e5eab7c
tree9ed1442fa8c784c0c092592ed5ecdaa50bc6bad0
parent30f8ee5e7e0ccce396dff209c6cbce49d0d7e167
xfs: use the directory name hash function for dir scrubbing

The directory code has a directory-specific hash computation function
that includes a modified hash function for case-insensitive lookups.
Hence we must use that function (and not the raw da_hashname) when
checking the dabtree structure.

Found by accidentally breaking xfs/188 to create an abnormally huge
case-insensitive directory and watching scrub break.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/dir.c