]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: Dump both inode details in Phase 6 duplicate file check
authorSrikanth C S <srikanth.c.s@oracle.com>
Mon, 25 Mar 2024 06:34:43 +0000 (06:34 +0000)
committerCarlos Maiolino <cem@kernel.org>
Tue, 23 Apr 2024 13:21:17 +0000 (15:21 +0200)
commitd5d677df76af140532dc95f8fb133ba340ea64c8
tree7d9eb734b8a93ee6c3d9bd992250a1c971902ba4
parentfa70379081a903b2ebe502e4d3ad8ebffbe30bee
xfs_repair: Dump both inode details in Phase 6 duplicate file check

The current check for duplicate names only dumps the inode number of the
parent directory and the inode number of the actual inode in question.
But, the inode number of original inode is not dumped. This patch dumps
the original inode too.

xfs_repair output before applying this patch
Phase 6 - check inode connectivity...
        - traversing filesystem ...
entry "dup-name1" (ino 132) in dir 128 is a duplicate name, would junk entry
entry "dup-name1" (ino 133) in dir 128 is a duplicate name, would junk entry

After this patch
Phase 6 - check inode connectivity...
        - traversing filesystem ...
entry "dup-name1" (ino 132) in dir 128 already points to ino 131, would junk entry
entry "dup-name1" (ino 133) in dir 128 already points to ino 131, would junk entry

The entry_junked() function takes in only 4 arguments. In order to
print the original inode number, modifying the function to take 5 parameters

Signed-off-by: Srikanth C S <srikanth.c.s@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
repair/phase6.c