freebsd-src/sys/cam/scsi
Warner Losh 99c14fb99f 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
2024-05-24 08:32:04 -06:00
..
scsi_all.c CAM: Replace random sbuf_printf() with cheaper cat/putc. 2023-11-22 18:04:05 -05:00
scsi_all.h cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_cd.c scsi_cd: Remove commented-out code 2024-01-30 09:26:03 -05:00
scsi_cd.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_ch.c cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_ch.h cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_da.c cam: Drop periph lock when completing I/O with ENOMEM status 2024-05-24 08:32:04 -06:00
scsi_da.h cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_enc.c cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_enc.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
scsi_enc_internal.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_enc_safte.c cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_enc_ses.c ses: Add error checking for copyout() calls 2023-12-25 21:04:00 -05:00
scsi_iu.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_message.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
scsi_pass.c cam: Let cam_periph_unmapmem() return an error 2023-12-28 12:36:15 -05:00
scsi_pass.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_pt.c cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_pt.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_sa.c sa: Make sa_param_table[] const and static 2023-12-27 20:28:25 -05:00
scsi_sa.h cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_ses.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
scsi_sg.c cam: Let cam_periph_unmapmem() return an error 2023-12-28 12:36:15 -05:00
scsi_sg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_targ_bh.c cam: Remove left-over sys/cdefs.h in sys/cam 2023-11-06 12:20:23 -07:00
scsi_target.c targ: Handle errors from suword() 2024-01-04 08:39:53 -05:00
scsi_targetio.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
scsi_xpt.c CAM: Replace random sbuf_printf() with cheaper cat/putc. 2023-11-22 18:04:05 -05:00
smp_all.c CAM: Replace random sbuf_printf() with cheaper cat/putc. 2023-11-22 18:04:05 -05:00
smp_all.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00