aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-10-27 08:17:32 -0600
committerJens Axboe <axboe@kernel.dk>2017-10-27 08:17:32 -0600
commit93689a603141ca9237203cebfa6b45775caccdb5 (patch)
tree7eccd67ff8cffb138596eb2569d5e16adf4f259d
parent15f859ae5c43c7f0a064ed92d33f7a5bc5de6de0 (diff)
parent7db814465395f3196ee98c8bd40d214d63e4f708 (diff)
downloadlinux-93689a603141ca9237203cebfa6b45775caccdb5.tar.gz
Merge branch 'nvme-4.14' of git://git.infradead.org/nvme into for-linus
Pull an NVMe fix from Christoph.
-rw-r--r--drivers/nvme/host/rdma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 87bac27ec64bfe..0ebb539f3bd3a7 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1614,12 +1614,15 @@ nvme_rdma_queue_is_ready(struct nvme_rdma_queue *queue, struct request *rq)
/*
* reconnecting state means transport disruption, which
* can take a long time and even might fail permanently,
- * so we can't let incoming I/O be requeued forever.
- * fail it fast to allow upper layers a chance to
- * failover.
+ * fail fast to give upper layers a chance to failover.
+ * deleting state means that the ctrl will never accept
+ * commands again, fail it permanently.
*/
- if (queue->ctrl->ctrl.state == NVME_CTRL_RECONNECTING)
+ if (queue->ctrl->ctrl.state == NVME_CTRL_RECONNECTING ||
+ queue->ctrl->ctrl.state == NVME_CTRL_DELETING) {
+ nvme_req(rq)->status = NVME_SC_ABORT_REQ;
return BLK_STS_IOERR;
+ }
return BLK_STS_RESOURCE; /* try again later */
}
}