xfs: move files to orphanage instead of letting nlinks drop to zero
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:56 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:57 +0000 (14:58 -0700)
commite6c9e75fbe792e1fb3bc7e7efce5c6bb015023c5
treed96b67161ac0bb4e5d3796de6a9d504e3dfe8714
parent1e58a8ccf2597c9259a8e71a2bffac5e11e12ea0
xfs: move files to orphanage instead of letting nlinks drop to zero

If we encounter an inode with a nonzero link count but zero observed
links, move it to the orphanage.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Documentation/filesystems/xfs/xfs-online-fsck-design.rst
fs/xfs/scrub/nlinks.c
fs/xfs/scrub/nlinks.h
fs/xfs/scrub/nlinks_repair.c
fs/xfs/scrub/repair.h
fs/xfs/scrub/trace.c
fs/xfs/scrub/trace.h