xfs: teach repair to fix file nlinks
authorDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:31:00 +0000 (12:31 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 22 Feb 2024 20:31:00 +0000 (12:31 -0800)
commit6b631c60c90a1e5264bc9bcdca2c0adb492d7a62
treeb61d8133340b4bf40345579e24bc8d5a13a45f87
parent86a1746eea91c6db983e6ccd3f846708746e47c2
xfs: teach repair to fix file nlinks

Fix the file link counts since we just computed the correct ones.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Makefile
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/nlinks.h
fs/xfs/scrub/nlinks_repair.c [new file with mode: 0644]
fs/xfs/scrub/repair.h
fs/xfs/scrub/scrub.c
fs/xfs/scrub/trace.h