HomeFreeBSD

Reimplement nvd(4) detach handling.

Description

Reimplement nvd(4) detach handling.

Previous code typically crashed in case of NVMe device unplug or even clean
detach while some I/Os are still in flight. To fix this the new code calls
disk_gone() and waits for confirmation of all references gone before calling
disk_destroy(), freeing other resources and allowing controller detach.

While there, fix disk lists locking and reimplement unit numbers assignment.

MFC after: 1 month
Sponsored by: iXsystems, Inc.

Details

Provenance
mavAuthored on
Parents
rS342556: Turn over releng/12.0 to so@.
Branches
Unknown
Tags
Unknown