Merge tag 'inode-repair-improvements-6.10_2024-04-15' of https://git.kernel.org/pub...
authorChandan Babu R <chandanbabu@kernel.org>
Tue, 16 Apr 2024 07:12:17 +0000 (12:42 +0530)
committerChandan Babu R <chandanbabu@kernel.org>
Tue, 16 Apr 2024 07:12:17 +0000 (12:42 +0530)
commit9ba8e658d867be96f9da58f060deff1e9cbca1a9
treef6ccd2cd5461c1760cb13f7bf3bff9087d080e54
parent1eef01250de4d2c6f779d3bc515bf7b7f3644f3b
parent1a5f6e08d4e379a23da5be974aee50b26a20c5b0
Merge tag 'inode-repair-improvements-6.10_2024-04-15' of https://git./linux/kernel/git/djwong/xfs-linux into xfs-6.10-mergeA

xfs: inode-related repair fixes

While doing QA of the online fsck code, I made a few observations:
First, nobody was checking that the di_onlink field is actually zero;
Second, that allocating a temporary file for repairs can fail (and
thus bring down the entire fs) if the inode cluster is corrupt; and
Third, that file link counts do not pin at ~0U to prevent integer
overflows.  Fourth, the x{chk,rep}_metadata_inode_fork functions
should be subclassing the main scrub context, not modifying the
parent's setup willy-nilly.

This scattered patchset fixes those three problems.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
* tag 'inode-repair-improvements-6.10_2024-04-15' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: create subordinate scrub contexts for xchk_metadata_inode_subtype
  xfs: pin inodes that would otherwise overflow link count
  xfs: try to avoid allocating from sick inode clusters
  xfs: check unused nlink fields in the ondisk inode