]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r342557, r342559: Reimplement nvd(4) detach handling.
authormav <mav@FreeBSD.org>
Fri, 25 Jan 2019 20:00:59 +0000 (20:00 +0000)
committermav <mav@FreeBSD.org>
Fri, 25 Jan 2019 20:00:59 +0000 (20:00 +0000)
commitbfb1323a075dc3535d422570b54cca62c5a54ffb
treeff49fb38dd98de495b71793ac878b1049bba25b0
parent58e6efc1eb253c25e32671305fb296c75c88e173
MFC r342557, r342559: 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.
sys/dev/nvd/nvd.c