HomeFreeBSD

cam: Drop periph lock when completing I/O with ENOMEM status

Description

cam: Drop periph lock when completing I/O with ENOMEM status

When biofinish calls g_io_deliver with an error of ENOMEM, that kicks
off the slowdown protocol, forcing I/O to go through g_down rather than
be directly dispatch. One of the side effects is that the I/O is
resubmitted, so the start routines get called recursively, leading to a
recursive lock panic. Rather than make the periph lock recursive, drop
and reacquire the lock around such calls to biofinish.

For nda, this happens only when we can't allocate space to construct a
TRIM. For ada and da, this is only for certain ZONE operations.

Sponsored by: Netflix
Reviewed by: gallatin
Differential Revision: https://reviews.freebsd.org/D45310

Details

Provenance
impAuthored on May 24 2024, 2:32 PM
Reviewer
gallatin
Differential Revision
D45310: cam: Drop periph lock when completing I/O with ENOMEM status
Parents
rG6d83b381860b: geom_io: Shift to pause_sbt to eliminate bogus min and update comment.
Branches
Unknown
Tags
Unknown