From: Sagi Grimberg <sagi@grimberg.me>
Date: Wed, 11 Oct 2017 15:29:10 +0300
Subject: nvme-rdma: Don't local invalidate if the queue is not live
Patch-mainline: v4.15-rc1
Git-commit: 60a518863368c7e124cd8411c2481d0938f53e08
References: FATE#323952, FATE#322506
No chance for the local invalidate to succeed if the queue-pair
is in error state. Most likely the target will do a remote
invalidation of our mr so not a big loss on the test_bit.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Johannes Thumshirn <jthumshirn@suse.de>
---
drivers/nvme/host/rdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1054,7 +1054,7 @@ static void nvme_rdma_unmap_data(struct
if (!blk_rq_bytes(rq))
return;
- if (req->mr->need_inval) {
+ if (req->mr->need_inval && test_bit(NVME_RDMA_Q_LIVE, &req->queue->flags)) {
res = nvme_rdma_inv_rkey(queue, req);
if (unlikely(res < 0)) {
dev_err(ctrl->ctrl.device,