Skip to contentSkip to conversation

nvme-fabrics: don't fast fail on ctrl state DELETING

PATCH In review Sagi Grimberg 2 participants 2 messages Jul 24, 2020 – Jul 26, 2020 NVMe

lore
Share & tools
lore

Sagi Grimberg

author maintainer
#0 lore raw

PATCH 1/1 nvme-fabrics: don't fast fail on ctrl state DELETING

This is now an state that allows for I/O to be sent to the device, and when the device shall transition into NVME_CTRL_DELETING_NOIO we shall fail the I/O.

Note that this is fine because the transport itself has a queue state to protect against queue access.

---
 drivers/nvme/host/fabrics.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Christoph: this should probably be folded into
97e9bb2b27bc ("nvme: fix deadlock in disconnect during scan_work and/or ana_work")

drivers/nvme/host/fabrics.h +2 -1
index a0ec40ab62ee..a9c1e3b4585e 100644
@@ -182,7 +182,8 @@ bool nvmf_ip_options_match(struct nvme_ctrl *ctrl,
 static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
 		bool queue_live)
 {
-	if (likely(ctrl->state == NVME_CTRL_LIVE))
+	if (likely(ctrl->state == NVME_CTRL_LIVE ||
+		   ctrl->state == NVME_CTRL_DELETING))
 		return true;
 	return __nvmf_check_ready(ctrl, rq, queue_live);
 }
Signature · 7 lines
2.25.1


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
#1 lore raw
Quoted 9 lines · Sagi Grimberg

This is now an state that allows for I/O to be sent to the device, and when the device shall transition into NVME_CTRL_DELETING_NOIO we shall fail the I/O.

Note that this is fine because the transport itself has a queue state to protect against queue access.

I've folded this into the original patch adding
NVME_CTRL_DELETING_NOIO, thanks.

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme