OSDN Git Service

nvme-pci: Unblock reset_work on IO failure
authorKeith Busch <keith.busch@intel.com>
Tue, 14 May 2019 20:27:53 +0000 (14:27 -0600)
committerKeith Busch <keith.busch@intel.com>
Fri, 17 May 2019 17:04:04 +0000 (11:04 -0600)
commit2036f7263d70e67d70a67899a468588cb7356bc9
tree238af298a51abd7391b47e49662a77ae68b1f458
parent39a9dd81f864aa20be896bb34b4bbc2501a2453d
nvme-pci: Unblock reset_work on IO failure

The reset_work waits for queued IO to complete before setting the
controller to live. If any of these times out and requeues, we won't be
able to restart the controller because the reset_work is already running.

Flush all entered requests to a failed completion if a timeout occurs
in the connecting state, and ensure the controller can't transition to
the live state after we've unblocked it from waiting for completions.

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/pci.c