HomeFreeBSD

zio: Avoid sleeping in the I/O path

Description

zio: Avoid sleeping in the I/O path

zio_delay_interrupt(), apparently used for fault injection, is executed
in the I/O pipeline. It can cause the calling thread to go to sleep,
which is not allowed on FreeBSD. This happens only for small delays,
though, and there's no apparent reason to avoid deferring to a taskqueue
in that case, as it already does otherwise.

Simply go to sleep unconditionally. This fixes an occasional panic I
see when running the ZTS on FreeBSD. Also remove an unhelpful comment
referencing the non-existent timeout_generic().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #16785

Details

Provenance
markjAuthored on Nov 20 2024, 4:23 PM
GitHub <noreply@github.com>Committed on Nov 20 2024, 4:23 PM
Parents
rG457f8b76e768: BRT: More optimizations after per-vdev splitting
Branches
Unknown
Tags
Unknown