HomeFreeBSD

Refactor NVMe CAM integration.

Description

Refactor NVMe CAM integration.

  • Remove layering violation, when NVMe SIM code accessed CAM internal

device structures to set pointers on controller and namespace data.
Instead make NVMe XPT probe fetch the data directly from hardware.

  • Cleanup NVMe SIM code, fixing support for multiple namespaces per

controller (reporting them as LUNs) and adding controller detach support
and run-time namespace change notifications.

  • Add initial support for namespace change async events. So far only

in CAM mode, but it allows run-time namespace arrival and departure.

  • Add missing nvme_notify_fail_consumers() call on controller detach.

Together with previous changes this allows NVMe device detach/unplug.

Non-CAM mode still requires a lot of love to stay on par, but at least
CAM mode code should not stay in the way so much, becoming much more
self-sufficient.

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

Details

Provenance
mavAuthored on
Reviewer
imp
Parents
rS334199: Fix a memory leak on topology_parse().
Branches
Unknown
Tags
Unknown