tag name | btree-complain-bad-records_2022-11-09 (ec752c2f30481a860c8acfd8472611fb9922e16f) |
tag date | 2022-11-09 19:09:38 -0800 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 712ad27ef6... |
xfs: standardize btree record checking code
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-----
iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNsa3IACgkQ+H93GTRK
tOu82w/+JO+3KMPGOpOYALxVDVx7cFqXEa2kUQCjaYi8lF2MwTxWMW53MuZFf0At
xkCl/Vp3rOLBp0WOYTS9DG6P6ziygmQ5+P7EO15lR5GTtMKm6SQ6zk0taLM070qx
/8+zEdr8pEIx5MUhuILfBDGAptf35FDyLbRbG2a1XzicxNFUHq/6QiN0uz1/daM+
WlPQZalnhh5hU1tWz8AYVr64aN5EIahEkMJxwMjEHxpfATQXUOKXZiEbeozgcp28
auabyDnmfLhpvJbFybiQWLiVcsbc2ZbvYbgOFuvjjmCxO3nsJROlFEpfKHNDpIDV
polXCnB27j+xoMpdZmyJlvkpX8P5fdHMoHz7s+AtcOVnqBv2yivnpF+IVtd0d+y+
k4VPqEmOim1Xk+RqtqQqN4fwI6/3EnvC7fPTBTu4Pt89cWc0xjw8eXEhEN4pw8TF
gTCnQ1/h/c3bPjMRrTFkSLBJ1V0rkv1And0lbSsResriUi+OZdGCS+ce04opcM2E
/EEDpTL+r+Wlg3pLEGXUUm5QxJpiwirFiNj1lrBshl+TR/IIpT4YZCcRq9XOhDFN
gZVrcz7/WCIaqJzAibuQ/EfW4rpwn+47CqR9BwiW1Cc1wjl37VMh/Vd9yBkMXwMx
ce3liZjQ+VFLxMmRR5cWdJRBfhR7Lg++Dq5XsyaCoVPM3hq1Jd8=
=V6m0
-----END PGP SIGNATURE-----