All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] nvme-fc: fix race with connectivity loss and nvme_fc_create_association
@ 2024-10-29 18:40 Daniel Wagner
  2024-10-29 18:40 ` [PATCH v2 1/2] nvme-fc: go straight to connecting state when initializing Daniel Wagner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Daniel Wagner @ 2024-10-29 18:40 UTC (permalink / raw)
  To: James Smart, Keith Busch, Christoph Hellwig, Sagi Grimberg,
	Hannes Reinecke, Paul Ely
  Cc: linux-nvme, linux-kernel, Daniel Wagner

We got a bug report that a controller was stuck in the connected state
after an association dropped.

It turns out that nvme_fc_create_association can succeed even though some
operation do fail. This is on purpose to handle the degraded controller
case, where the admin queue is up and running but not the io queues. In
this case the controller will still reach the LIVE state.

Unfortunatly, this will also ignore full connectivity loss for fabric
controllers. Let's address this by not filtering out all errors in
nvme_set_queue_count.

I haven't tested this version yet, as it needs a bit of tinker in my
setup. So the question is this a better approach? I think it would also
be great to hear from Paul if this works.

In theory the nvme_set_queue_count call still could pass and later
connectivity loss could happen, just before entering the LIVE state. In
this case the only thing to observe the connectivity loss is the keep
alive handler which currently does nothing. I think we should also
trigger a reset in this case. What do you think?

---
Changes in v2:
  - handle connection lost in nvme_set_queue_count directly
  - collected reviewed tags
  - Link to v1: https://lore.kernel.org/r/20240611190647.11856-1-dwagner@suse.de

---
Daniel Wagner (2):
      nvme-fc: go straight to connecting state when initializing
      nvme: handle connectivity loss in nvme_set_queue_count

 drivers/nvme/host/core.c | 7 ++++++-
 drivers/nvme/host/fc.c   | 3 +--
 2 files changed, 7 insertions(+), 3 deletions(-)
---
base-commit: 5e52f71f858eaff252a47530a5ad5e79309bd415
change-id: 20241029-nvme-fc-handle-com-lost-9b241936809a

Best regards,
-- 
Daniel Wagner <wagi@kernel.org>



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

end of thread, other threads:[~2024-10-30  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-29 18:40 [PATCH v2 0/2] nvme-fc: fix race with connectivity loss and nvme_fc_create_association Daniel Wagner
2024-10-29 18:40 ` [PATCH v2 1/2] nvme-fc: go straight to connecting state when initializing Daniel Wagner
2024-10-29 18:40 ` [PATCH v2 2/2] nvme: handle connectivity loss in nvme_set_queue_count Daniel Wagner
2024-10-30  4:38 ` [PATCH v2 0/2] nvme-fc: fix race with connectivity loss and nvme_fc_create_association Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.