]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-rdma: fix controller reset hang during traffic
authorSagi Grimberg <sagi@grimberg.me>
Tue, 28 Jul 2020 00:32:09 +0000 (17:32 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 29 Jul 2020 05:45:22 +0000 (07:45 +0200)
commit6b1ac5051ec7d5f28f8613191596b743a1a99efb
tree0c3849d094ebb939314a1dbccc49359be08be664
parent31f5f8124c083e3823f16c16268e21fb0f4ec669
nvme-rdma: fix controller reset hang during traffic

commit 313e08fe6706 ("block: update hctx map when use multiple maps")
exposed an issue where we may hang trying to wait for queue freeze
during I/O. We call blk_mq_update_nr_hw_queues which in case of multiple
queue maps (which we have now for default/read/poll) is attempting to
freeze the queue. However we never started queue freeze when starting the
reset, which means that we have inflight pending requests that entered the
queue that we will not complete once the queue is quiesced.

So start a freeze before we quiesce the queue, and unfreeze the queue
after we successfully connected the I/O queues (and make sure to call
blk_mq_update_nr_hw_queues only after we are sure that the queue was
already frozen).

This follows to how the pci driver handles resets.

Fixes: 313e08fe6706 ("block: update hctx map when use multiple maps")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c