HomeFreeBSD

FreeBSD: Improve crypto_dispatch() handling

Description

FreeBSD: Improve crypto_dispatch() handling

Handle crypto_dispatch() return values same as crp->crp_etype errors.
On FreeBSD 12 many drivers returned same errors both ways, and lack
of proper handling for the first ended up in assertion panic later.
It was changed in FreeBSD 13, but there is no reason to not be safe.

While there, skip waiting for completion, including locking and
wakeup() call, for sessions on synchronous crypto drivers, such as
typical aesni and software.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13563

Details

Provenance
mavAuthored on Jun 17 2022, 10:38 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jul 26 2022, 5:10 PM
Parents
rG916d9de15841: Reduce ZIO io_lock contention on sorted scrub
Branches
Unknown
Tags
Unknown

Event Timeline