nvme-rdma: fix reset hang if controller died in the middle of a reset
authorSagi Grimberg <sagi@grimberg.me>
Thu, 30 Jul 2020 20:42:42 +0000 (13:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 11:55:35 +0000 (13:55 +0200)
commite625888ac2aa6c59ec8564785ab0a0bd90a96085
treead361bff185b537f6cd40f68dd9b5142e8a8c0b3
parentca46ff644ab0324eb0de939155a08122f97523b0
nvme-rdma: fix reset hang if controller died in the middle of a reset

[ Upstream commit 2362acb6785611eda795bfc12e1ea6b202ecf62c ]

If the controller becomes unresponsive in the middle of a reset, we
will hang because we are waiting for the freeze to complete, but that
cannot happen since we have commands that are inflight holding the
q_usage_counter, and we can't blindly fail requests that times out.

So give a timeout and if we cannot wait for queue freeze before
unfreezing, fail and have the error handling take care how to
proceed (either schedule a reconnect of remove the controller).

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/rdma.c