]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
nvme-fc: track error_recovery while connecting
authorJames Smart <james.smart@broadcom.com>
Fri, 23 Oct 2020 22:26:04 +0000 (15:26 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 27 Oct 2020 09:01:30 +0000 (10:01 +0100)
commitcaf1cbe3677576ef860f7bbba9074d0e6a0bcabb
treea61e944b798a4db7a786f5b74feba2cc6ffba926
parent25c1ca6ecaba3b751d3f7ff92d5cddff3b05f8d0
nvme-fc: track error_recovery while connecting

Whenever there are errors during CONNECTING, the driver recovers by
aborting all outstanding ios and counts on the io completion to fail them
and thus the connection/association they are on.  However, the connection
failure depends on a failure state from the core routines.  Not all
commands that are issued by the core routine are guaranteed to cause a
failure of the core routine. They may be treated as a failure status and
the status is then ignored.

As such, whenever the transport enters error_recovery while CONNECTING,
it will set a new flag indicating an association failed. The
create_association routine which creates and initializes the controller,
will monitor the state of the flag as well as the core routine error
status and ensure the association fails if there was an error.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c