summaryrefslogtreecommitdiff
tag namecorruption-health-reports_2022-10-14 (f8501414e40ba6585a6aaa917ceb9770452b93e9)
tag date2022-10-14 14:18:46 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 00a46865b7...
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+H93GTRKtOsFAmNJ0jYACgkQ+H93GTRK tOv3wQ/9GfvrFa3gQiqVND7XiUzEYzJsBZ7Ov3Uw9atAglc7ROAsqsUQT5VRM7r2 RyGJy/rx7H1mvf00qh4yct2C1GCbI+vC22OTqpe8tX6g8srBIrKnS6B50NL38l24 20X0ar7+FvucAxdu0ODqUAJsokeC5dzLcBauYEWk5VLmOYfWkwyHMQJj2agaF7k7 kGsanFaNygvAVI+tLvPMTy5GsBl0WmxPYjMylEpWVA89NXx9haVz01O7njbUIWFv GWt8GTqXd2HfY5A5PIVFKYovLMGB28Q2rTQ4dOSgvmns0XKoEo5SJvKZ/9zX1MJw uMbSCX0MG7V+mTzARWgojoximPB01dL1EY3W1x1VoD7ZOg5Z27/689O8ghhesws+ /M+NNPzMCiiwjG8gp5ybkjTBCEDCh5y+XMTEMdgEYNr1exX2rp72B4lmVZGvjzQK 5vEvHq+4BiDl/i5l02avkdfpW937ZLMrMYZRYdqh2EJZzxrfxJfhpuVZhhPg02pF 8sHylI6qBBq1IugdYodm8YGTD64EkQZRwMLlJKtsTMNKYgQ0j3O4QAjoeYfLbeAd CrWT8EOUKeSfbP2b6xZv+mNLOE5swMB1NMECQKaKv8/dYcbhmkTKNS7E2MRp1I5e Xdxc2tK5QXZ4iqfjsfQfdDRu8MfiL4YlYt1Ae3yThP/smRHKBt0= =Ry0c -----END PGP SIGNATURE-----