HomeFreeBSD

Create a sysctl kern.cam.{,a,n}da.X.invalidate

Description

Create a sysctl kern.cam.{,a,n}da.X.invalidate

kern.cam.{,a,n}da.X.invalidate=1 forces *daX to detach by calling
cam_periph_invalidate on the underlying periph. This is for testing
purposes only. Include only with options CAM_TEST_FAILURE and rename
the former [AN]DA_TEST_FAILURE, and fix nda to compile with it set.
We're using it at work to harden geom and the buffer cache to be
resilient in the face of drive failure. Today, it far too often
results in a panic. While much work was done on SIM initiated removal
for the USB thumnb drive removal work, little has been done for periph
initiated removal. This simulates what *daerror() does for some errors
nicely: we get the same panics with it that we do with failing drives.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D14581

Details

Provenance
impAuthored on
Differential Revision
D14581: Create a sysctl kern.cam.{,a,n}da.X.invalidate
Parents
rS330934: This should have been += so clean builds work.
Branches
Unknown
Tags
Unknown