]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-rdma: fix timeout handler
authorSagi Grimberg <sagi@grimberg.me>
Wed, 29 Jul 2020 09:36:03 +0000 (02:36 -0700)
committerSagi Grimberg <sagi@grimberg.me>
Fri, 28 Aug 2020 23:43:57 +0000 (16:43 -0700)
commit117ebb64caa4c8897c516cbfbd34c433420fd86d
tree07be108b2f3ccffffbdcd750c4494860a3f7f343
parent1717a5ebd794d44edf4b1ddd0d2e9fc2d046a4d2
nvme-rdma: fix timeout handler

When a request times out in a LIVE state, we simply trigger error
recovery and let the error recovery handle the request cancellation,
however when a request times out in a non LIVE state, we make sure to
complete it immediately as it might block controller setup or teardown
and prevent forward progress.

However tearing down the entire set of I/O and admin queues causes
freeze/unfreeze imbalance (q->mq_freeze_depth) because and is really
an overkill to what we actually need, which is to just fence controller
teardown that may be running, stop the queue, and cancel the request if
it is not already completed.

Now that we have the controller teardown_lock, we can safely serialize
request cancellation. This addresses a hang caused by calling extra
queue freeze on controller namespaces, causing unfreeze to not complete
correctly.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/rdma.c