summaryrefslogtreecommitdiff
tag namecorruption-health-reports_2022-11-09 (6b76fcf38502b061f33aebb7916d0a439d95bca9)
tag date2022-11-09 19:10:06 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 40ed0b95ad...
xfs: report corruption to the health trackers
Any time that the runtime code thinks it has found corrupt metadata, it should tell the health tracking subsystem that the corresponding part of the filesystem is sick. These reports come primarily from two places -- code that is reading a buffer that fails validation, and higher level pieces that observe a conflict involving multiple buffers. This patchset uses automated scanning to update all such callsites with a mark_sick call. Doing this enables the health system to record problem observed at runtime, which (for now) can prompt the sysadmin to run xfs_scrub, and (later) may enable more targetted fixing of the filesystem. Note: Earlier reviewers of this patchset suggested that the verifier functions themselves should be responsible for calling _mark_sick. In a higher level language this would be easily accomplished with lambda functions and closures. For the kernel, however, we'd have to create the necessary closures by hand, pass them to the buf_read calls, and then implement necessary state tracking to detach the xfs_buf from the closure at the necessary time. This is far too much work and complexity and will not be pursued further. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNsa44ACgkQ+H93GTRK tOup1hAAiLSVK/Njd7JJuJcqbzV4zPHOTzs982piqaRmzECEliQ3os6kqF/NZ+WL IMbIpJRZxSZpi9mMH/Y4P/kySegZjCHAo8M1wM1aa2dv2lVIm8lZvx9aez1XssjF ceIzmVVIi0ehPvQ5toC2uze8Lid54f8JJuiUWfYGdnnxOppbeD594+gB/IyaoeNu g7o69YJkmylbnUVRfBitBXMlHb/7eyuYvtEgO90uF6ziAMEivmISRYZ3BrU2ktP9 rRJVofETPj7gceVptoqt69H3okj1NyLekFqR0PMhhdcs9v0BKcdAn4/K3uOm4FxN RtFi5xSk//XTb2Ilk4yhL93wFzhH1l27zWmx674Lq7ndMnmGhHK3dJxwGglKhTIp sVtnoUxwDKOvyGyVWq122pbG/be+MZPMzGX3yuQ1mYl2NRhdLnjQMCms8tPSHfFm krfY4HdETnXd6IBI2eazvefwRhbPCMo7yuDxNBZeirm9b5N3YljheuwgUbtYgO20 io72q/3I6SYsjHEQAomGW3+bPOOOxc2EmNf5zdgEnx/1su0yypst6v8AAhc8DJvW N2BXIQILCSnshBYbgyLBG2ZpqRsP0nMyw5Q+rTNnBt/V3gnpn6jI3H9mOytpAYa/ lh0X4/O0gZBNExhLHhhQNs5L9UHgPC+ghFi2wQcnQcvQYO0I9pE= =/dqX -----END PGP SIGNATURE-----