[PATCH] nvme-fabrics: don't fast fail on ctrl state DELETING
Sagi Grimberg
sagi at grimberg.me
Fri Jul 24 12:32:10 EDT 2020
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.
Reported-by: Logan Gunthorpe <logang at deltatee.com>
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
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")
diff --git a/drivers/nvme/host/fabrics.h b/drivers/nvme/host/fabrics.h
index a0ec40ab62ee..a9c1e3b4585e 100644
--- a/drivers/nvme/host/fabrics.h
+++ b/drivers/nvme/host/fabrics.h
@@ -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);
}
--
2.25.1
More information about the Linux-nvme
mailing list