]> asedeno.scripts.mit.edu Git - linux.git/commit
nvme_fc: io timeout should defer abort to ctrl reset
authorJames Smart <jsmart2021@gmail.com>
Mon, 12 Mar 2018 16:32:22 +0000 (09:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 26 Mar 2018 14:53:43 +0000 (08:53 -0600)
commit041018c634e44d8697879b241e17a9466f2e83ed
tree53e00f48126041fa836c3652c0a9d36226c0667a
parentcf25809bec2c7df4b45df5b2196845d9a4a3c89b
nvme_fc: io timeout should defer abort to ctrl reset

The current nvme_fc code, when an io times out, will abort the io
on the fc link, then call the error recovery routine to reset the
controller. It is during the reset of the controller that the
transport will wait for all ios to be aborted before sending a
Disconnect LS to the target.

However, the reset routine only waits for the io which it generates
the abort for to complete. Any io that was aborted just prior to the
reset isn't in it's list to wait for. Thus the Disconnect is getting
sent before the aborts have completed.

Correct by removing the abort in the timeout handler. The reset will
generate the abort. At that point the timeout handler can be simplified
to request the reset (via the error handler) and restart the timeout
timer.

Also fixes a small typo in a comment in the reset handler.

Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c