Skip to content
  • Bart Van Assche's avatar
    IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning · 34aa654e
    Bart Van Assche authored
    
    
    If a cable is pulled during LUN scanning it can happen that the
    SRP rport and the SCSI host have been created but no LUNs have been
    added to the SCSI host. Since multipathd only sends SCSI commands
    to a SCSI target if one or more SCSI devices are present and since
    there is no keepalive mechanism for IB queue pairs this means that
    after a LUN scan failed and after a reconnect has succeeded no
    data will be sent over the QP and hence that a subsequent cable
    pull will not be detected. Avoid this by not creating an rport or
    SCSI host if a cable is pulled during a SCSI LUN scan.
    
    Note: so far the above behavior has only been observed with the
    kernel module parameter ch_count set to a value >= 2.
    
    Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
    Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    34aa654e