]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nvme-fabrics: Allow ctrl loss timeout configuration
authorSagi Grimberg <sagi@grimberg.me>
Sat, 18 Mar 2017 18:52:36 +0000 (20:52 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 4 Apr 2017 15:48:23 +0000 (09:48 -0600)
commit42a45274c225829637b585e1c994a68f59507108
treedf6fd42ca4b5d340776dfe6244faf6c1477487dd
parent7777bdedf31d674c4fd5ebbfbd27a6a6ae0a17e0
nvme-fabrics: Allow ctrl loss timeout configuration

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: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h