• Sagi Grimberg's avatar
    nvme-fabrics: Allow ctrl loss timeout configuration · 42a45274
    Sagi Grimberg authored
    When a host sense that its controller session is damaged,
    it tries to re-establish it periodically (reconnect every
    reconnect_delay). It may very well be that the controller
    is gone and never coming back, in this case the host will
    try to reconnect forever.
    
    Add a ctrl_loss_tmo to bound the number of reconnect attempts
    to a specific controller (default to a reasonable 10 minutes).
    The timeout configuration is actually translated into number of
    reconnect attempts and not a schedule on its own but rather
    divided with reconnect_delay. This is useful to prevent
    racing flows of remove and reconnect, and it doesn't really
    matter if we remove slightly sooner than what the user requested.
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    42a45274
fabrics.c 25.3 KB