summaryrefslogtreecommitdiffstats
path: root/lib/iomap.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@broadcom.com>2020-10-16 23:06:27 +0200
committerChristoph Hellwig <hch@lst.de>2020-10-23 12:52:16 +0200
commit52793d62a696e9188092eb0817fb1219ee5729ff (patch)
treee0b97d704070b87dde2bc94c29131f337a80c489 /lib/iomap.c
parentnvmet: don't use BLK_MQ_REQ_NOWAIT for passthru (diff)
downloadlinux-52793d62a696e9188092eb0817fb1219ee5729ff.tar.xz
linux-52793d62a696e9188092eb0817fb1219ee5729ff.zip
nvme-fc: fix io timeout to abort I/O
Currently, an I/O timeout unconditionally invokes nvme_fc_error_recovery() which checks for LIVE or CONNECTING state. If live, the routine resets the controller which initiates a reconnect - which is valid. If CONNECTING, err_work is scheduled. Err_work then calls the terminate_io routine, which also checks for CONNECTING and noops any further action on outstanding I/O. The result is nothing happened to the timed out io. As such, if the command was dropped on the wire, it will never timeout / complete, and the connect process will hang. Change the behavior of the io timeout routine to unconditionally abort the I/O. I/O completion handling will note that an io failed due to an abort and will terminate the connection / association as needed. If the abort was unable to happen, continue with a call to nvme_fc_error_recovery(). To ensure something different happens in nvme_fc_error_recovery() rework it so at it will abort all I/Os on the association to force a failure. As I/O aborts now may occur outside of delete_association, counting for completion must be wary and only count those aborted during delete_association when TERMIO is set on the controller. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'lib/iomap.c')
0 files changed, 0 insertions, 0 deletions