• J
    scsi: lpfc: Delay unregistering from transport until GIDFT or ADISC completes · 06145683
    James Smart 提交于
    On an RSCN event, the nodes specified in RSCN payload and in MAPPED state
    are moved to NPR state in order to revalidate the login. This triggers an
    immediate unregister from SCSI/NVMe backend. The assumption is that the
    node may be missing. The re-registration with the backend happens after
    either relogin (PLOGI/PRLI; if ADISC is disabled or login truly lost) or
    when ADISC completes successfully (rediscover with ADISC enabled).
    
    However, the NVMe-FC standard provides for an RSCN to be triggered when
    the remote port supports a discovery controller and there was a change
    of discovery log content. As the remote port typically also supports
    storage subsystems, this unregister causes all storage controller
    connections to fail and require reconnect.
    
    Correct by reworking the code to ensure that the unregistration only occurs
    when a login state is truly terminated, thereby leaving the NVMe storage
    controllers in place.
    
    The changes made are:
    
     - Retain node state in ADISC_ISSUE when scheduling ADISC ELS retry.
    
     - Do not clear wwpn/wwnn values upon ADISC failure.
    
     - Move MAPPED nodes to NPR during RSCN processing, but do not unregister
       with transport.  On GIDFT completion, identify missing nodes (not marked
       NLP_NPR_2B_DISC) and unregister them.
    
     - Perform unregistration for nodes that will go through ADISC processing
       if ADISC completion fails.
    
     - Successful ADISC completion will move node back to MAPPED state.
    
    Link: https://lore.kernel.org/r/20210707184351.67872-16-jsmart2021@gmail.comCo-developed-by: NJustin Tee <justin.tee@broadcom.com>
    Signed-off-by: NJustin Tee <justin.tee@broadcom.com>
    Signed-off-by: NJames Smart <jsmart2021@gmail.com>
    Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
    06145683
lpfc_els.c 333.2 KB