Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nvme-fabrics: don't fast fail on ctrl state DELETING
@ 2020-07-24 16:32 Sagi Grimberg
  2020-07-26 15:42 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Sagi Grimberg @ 2020-07-24 16:32 UTC (permalink / raw)
  To: linux-nvme, Christoph Hellwig, Keith Busch

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@deltatee.com>
Signed-off-by: Sagi Grimberg <sagi@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


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nvme-fabrics: don't fast fail on ctrl state DELETING
  2020-07-24 16:32 [PATCH] nvme-fabrics: don't fast fail on ctrl state DELETING Sagi Grimberg
@ 2020-07-26 15:42 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-07-26 15:42 UTC (permalink / raw)
  To: Sagi Grimberg; +Cc: Keith Busch, Christoph Hellwig, linux-nvme

On Fri, Jul 24, 2020 at 09:32:10AM -0700, Sagi Grimberg wrote:
> 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@deltatee.com>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 16:32 [PATCH] nvme-fabrics: don't fast fail on ctrl state DELETING Sagi Grimberg
2020-07-26 15:42 ` Christoph Hellwig

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git