]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: don't add junked entries to the rebuilt directory
authorDarrick J. Wong <djwong@kernel.org>
Mon, 5 Jun 2023 15:37:24 +0000 (08:37 -0700)
committerCarlos Maiolino <cem@kernel.org>
Wed, 12 Jul 2023 07:15:18 +0000 (09:15 +0200)
commitaca02624815ca47c6fd4cafdb0aeaad641ca1915
treeb8e6538a6f442fd3aaac8e8bd3b3550b9af28cec
parent1e12a0751b99efd48cda501258e16f00bef9d13d
xfs_repair: don't add junked entries to the rebuilt directory

If a directory contains multiple entries with the same name, we create
separate objects in the directory hashtab for each dirent.  The first
one has p->junkit==0, but the subsequent ones have p->junkit==1.
Because these are duplicate names that are not garbage, the first
character of p->name.name is not set to a slash.

Don't add these subsequent hashtab entries to the rebuilt directory.

Found by running xfs/155 with the parent pointers patchset enabled.

Fixes: 33165ec3b4b ("Fix dirv2 rebuild in phase6 Merge of master-melb:xfs-cmds:26664a by kenmcd.")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Pavel Reichl <preichl@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
repair/phase6.c