HomeFreeBSD

nvmf: Defer the post-sync shutdown handler to SHUTDOWN_PRI_LAST

Description

nvmf: Defer the post-sync shutdown handler to SHUTDOWN_PRI_LAST

nda(4) has its own shutdown handler that runs at SHUTDOWN_PRI_DEFAULT
that calls ndaflush() that could run after the nvmf handler. Instead,
give a the flush a chance to run before the graceful shutdown of the
controller.

While here, be a bit more defensive in the post-sync case and shutdown
the consumers (sim and /dev/nvmeXnY devices) before destroying the
queue pairs so that if any requests are submitted after the post-sync
handler they fail gracefully instead of trying to use a destroyed
queue pair.

Reported by: Sony Arpita Das <sonyarpitad@chelsio.com>
Sponsored by: Chelsio Communications

Details

Provenance
jhbAuthored on Oct 31 2024, 3:03 PM
Parents
rG0ff2d00d2aa3: ipsec: allow it to work with unmapped mbufs
Branches
Unknown
Tags
Unknown