HomeFreeBSD

nvmf: Narrow scope of sim lock in nvmf_sim_io

Description

nvmf: Narrow scope of sim lock in nvmf_sim_io

nvmf_submit_request() handles races with concurrent queue pair
destruction (or the queue pair being destroyed between
nvmf_allocate_request and nvmf_submit_request), so the lock is not
needed here. This avoids holding the lock across transport-specific
logic such as queueing mbufs for PDUs to a socket buffer, etc.

Holding the lock across nvmf_allocate_request() ensures that the queue
pair pointers in the softc are still valid as shutdown attempts will
block on the lock before destroying the queue pairs.

Sponsored by: Chelsio Communications

Details

Provenance
jhbAuthored on Sep 26 2024, 1:14 AM
Parents
rGaec2ae8b57fc: nvmf: Always use xpt_done instead of xpt_done_direct
Branches
Unknown
Tags
Unknown