• Mike Christie's avatar
    scsi: sd: Allow user to configure command retries · 0610959f
    Mike Christie authored
    Some iSCSI targets went with the traditional "export N ports" approach and
    then allowed the initiator to multipath over them. Other targets went the
    opposite direction and export a single port, and then software on the
    target side performs load balancing and failover to other targets via an
    iSCSI specific feature or IP takover.
    
    The problem for the 2nd type of config is we quickly run out of our five
    retries and get I/O errors. In these setups we want to reduce resource use
    on the initiator side so we only wanted the one session and no
    dm-multipath.  To handle traditional multipath operations like failover we
    do IP takover on the target side. So we would have an iSCSI target running
    on node1. Some monitoring software decides it's dead or the node is
    overloaded so it starts the iSCSI target on node2. The problem is for the
    failover case where we might have the equivalent of a dm-multipath
    temporary all paths down, or we just have to try more than 5 nodes before
    finding a good one.
    
    To handle this type of issue allow the user to configure the disk cmd
    retries from -1 to the current max of 5. -1 means infinite retries and
    should be used for setups where some other setting is going to control when
    to fail. For example iSCSI has the replacement/recovery timeout and fc
    (some users have used FC with NPIV and done something similar as IP
    takover) has dev_loss_tmo/fast_io_fail which will eventually expire and
    fail I/O.
    
    Link: https://lore.kernel.org/r/1601566554-26752-3-git-send-email-michael.christie@oracle.comReviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
    Signed-off-by: default avatarMike Christie <michael.christie@oracle.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    0610959f
sd.h 7.04 KB