nvme: wait until all completed request's complete fn is called
authorMing Lei <ming.lei@redhat.com>
Wed, 24 Jul 2019 03:48:42 +0000 (11:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:41:29 +0000 (21:41 -0600)
commit622b8b6893ff3096e130250c1298adf57a0cab03
tree43fe9b701fb75bdb6755a6f5c0849ad0605bf450
parent78ca40724713bd422873cb4ebee86f9f499650f7
nvme: wait until all completed request's complete fn is called

When aborting in-flight request for recovering controller, we have
to make sure that queue's complete function is called on completed
request before moving on. Otherwise, for example, the warning of
WARN_ON_ONCE(qp->mrs_used > 0) in ib_destroy_qp_user() may be
triggered on nvme-rdma.

Fix this issue by using blk_mq_tagset_wait_completed_request.

Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/fc.c
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/loop.c