NVMe hotplug support and related bug fixes
Review Request #2308 — Created Sept. 17, 2019 and updated
11698 Want NVMe Hotplug Support
11699 x86 pci configurator should not fail device teardown if device is gone
11700 DDI hotplug request handler resets connection handle state before performing state change operations
11701 ldi_handle dcmd segfaults occasionally
Please see the detailed testing notes in https://www.illumos.org/issues/11698
|I think there is a race condition in between this piece of code and nvme_submit_io_cmd()/nvme_submit_cmd_common(). 1. A drive is hot-unplugged. ...||pwinder|
I think there is a race condition in between this piece of code and nvme_submit_io_cmd()/nvme_submit_cmd_common().
1. A drive is hot-unplugged.
2. An I/O is being submitted, and the code is after the n_dead check in nvme_submit_io_cmd().
3. The remove_callback is run. Sets n_dead and acquires the the nq_mutex before nvme_submit_cmd_common().
4. nvme_submit_cmd_common() blocks whilst nvme_remove_callback() empties the cmd queues.
5. nvme_submit_cmd_common() queues the command.
After 5. the I/O will hang.