summaryrefslogtreecommitdiff
tag namebtree-complain-bad-records-6.4_2023-04-12 (844572d5fb5c113b0fcc49a205c250f8e437379f)
tag date2023-04-12 17:40:10 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 6a3bd8fcf9...
xfs: standardize btree record checking code [v24.5]
While I was cleaning things up for 6.1, I noticed that the btree _query_range and _query_all functions don't perform the same checking that the _get_rec functions perform. In fact, they don't perform /any/ sanity checking, which means that callers aren't warned about impossible records. Therefore, hoist the record validation and complaint logging code into separate functions, and call them from any place where we convert an ondisk record into an incore record. For online scrub, we can replace checking code with a call to the record checking functions in libxfs, thereby reducing the size of the codebase. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZDdPagAKCRBKO3ySh0YR pmQtAQC6iz4gfxuCNdqU8cLjkD2BTzGoFFadlB5bIvVrwPlFCAD9HVHNBM6D1+jt BysDOvlqAzppuHAil/Za+LTR9jAiYAY= =enLZ -----END PGP SIGNATURE-----