xfs: fixes for the block mapping checker [v26.1]

This series amends the file extent map checking code so that nonexistent
 cow/attr forks get the ENOENT return they're supposed to; and fixes some
 incorrect logic about the presence of a cow fork vs. reflink iflag.
 
 This has been running on the djcloud for years with no problems.  Enjoy!
 
 Signed-off-by: Darrick J. Wong <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZNT+WQAKCRBKO3ySh0YR
 pl9yAQCuAluDN+6ToSqmGrubdnnjlUhQZPJMbo8orE5/M4F0wgEAl8fI+JBs3psd
 L3F/qsJEVy02bbVpONUCvDTFU/4wNwg=
 =tL3U
 -----END PGP SIGNATURE-----

Merge tag 'scrub-bmap-fixes-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.6-mergeA

xfs: fixes for the block mapping checker

This series amends the file extent map checking code so that nonexistent
cow/attr forks get the ENOENT return they're supposed to; and fixes some
incorrect logic about the presence of a cow fork vs. reflink iflag.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>

* tag 'scrub-bmap-fixes-6.6_2023-08-10' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:
  xfs: don't check reflink iflag state when checking cow fork
  xfs: simplify returns in xchk_bmap
  xfs: rewrite xchk_inode_is_allocated to work properly
  xfs: hide xfs_inode_is_allocated in scrub common code
This commit is contained in:
Chandan Babu R 2023-08-18 13:39:32 +05:30
commit 220c8d57f5
7 changed files with 193 additions and 62 deletions