Thread (9 messages) 9 messages, 4 authors, 2018-09-25
STALE2855d

[PATCH] nvme: call nvme_complete_rq on NVME_MPATH failures

From: hare@suse.de (Hannes Reinecke)
Date: 2018-09-24 10:33:05

On 9/24/18 11:57 AM, Hannes Reinecke wrote:
On 9/21/18 8:49 PM, James Smart wrote:
[ .. ]
quoted
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 206d63cb1afc..ed4b8e8e0249 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -548,11 +548,20 @@ static struct nvmf_transport_ops 
*nvmf_lookup_transport(
? blk_status_t nvmf_fail_nonready_command(struct nvme_ctrl *ctrl,
????????? struct request *rq)
? {
+??? struct nvme_request *nvmerq = nvme_req(rq);
+
????? if (ctrl->state != NVME_CTRL_DELETING &&
????????? ctrl->state != NVME_CTRL_DEAD &&
????????? !blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
????????? return BLK_STS_RESOURCE;
-??? nvme_req(rq)->status = NVME_SC_ABORT_REQ;
+
+??? nvmerq->status = NVME_SC_ABORT_REQ;
+??? nvmerq->result.u64 = 0;
+??? if (rq->cmd_flags & REQ_NVME_MPATH) {
+??????? blk_mq_start_request(rq);
+??????? nvme_complete_rq(rq);
+??????? return BLK_STS_OK;
BLK_STS_TRANSPORT ?
Ah, no. Not a good idea :-)

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N?rnberg)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help