HomeFreeBSD

MFC r342946: Remove accessing remote node and domain objects

Description

MFC r342946: Remove accessing remote node and domain objects
while processing cam actions.

Issue:
  ocs_fc(4) driver panics. It's induced by setting the port_state
sysctl to offline, then online, then offline, then online, and so
forth and so on in rapid succession.

Reason:
  While we set the port_state to online fc discovery will start and OS
is enumerating the target discs by calling ocs_action(),  then set the
port state to "offline" which deletes domain/sport/nodes.

  In ocs_action()->XPT_GET_TRAN_SETTINGS we are accessing the remote
node which can be invalid to get the wwpn, wwnn and port.

Fix:
  Removed accessing of remote node and domain in some ocs_action() cases.
  Populated the required values from ocs_fcport.
  This removes the dependency of node and domain structures while
processing XPT_PATH_INQ and XPT_GET_TRAN_SETTINGS.
   We will invalidate the target entries after the device lost
timeout(30 seconds).

Approved by:ken,mav

Details

Provenance
ramAuthored on
Parents
rS344054: MFC r342946: Remove accessing remote node and domain objects
Branches
Unknown
Tags
Unknown