Merge tag 'scrub-nlinks-6.9_2024-02-23' of https://git.kernel.org/pub/scm/linux/kerne...
authorChandan Babu R <chandanbabu@kernel.org>
Sat, 24 Feb 2024 04:17:39 +0000 (09:47 +0530)
committerChandan Babu R <chandanbabu@kernel.org>
Sat, 24 Feb 2024 04:17:39 +0000 (09:47 +0530)
commit128d0fd1ab093585ca8f7afdea6e55b59072ff35
treeb61d8133340b4bf40345579e24bc8d5a13a45f87
parentaa03f524a2e38085d814f9e5614410dc12c8aeee
parent6b631c60c90a1e5264bc9bcdca2c0adb492d7a62
Merge tag 'scrub-nlinks-6.9_2024-02-23' of https://git./linux/kernel/git/djwong/xfs-linux into xfs-6.9-mergeC

xfs: online repair of file link counts

Now that we've created the infrastructure to perform live scans of every
file in the filesystem and the necessary hook infrastructure to observe
live updates, use it to scan directories to compute the correct link
counts for files in the filesystem, and reset those link counts.

This patchset creates a tailored readdir implementation for scrub
because the regular version has to cycle ILOCKs to copy information to
userspace.  We can't cycle the ILOCK during the nlink scan and we don't
need all the other VFS support code (maintaining a readdir cursor and
translating XFS structures to VFS structures and back) so it was easier
to duplicate the code.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
* tag 'scrub-nlinks-6.9_2024-02-23' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: teach repair to fix file nlinks
  xfs: track directory entry updates during live nlinks fsck
  xfs: teach scrub to check file nlinks
  xfs: report health of inode link counts