Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/7] nvme controller reset and namespace scan work race conditions
@ 2019-08-08 20:53 Sagi Grimberg
  2019-08-08 20:53 ` [PATCH v3 1/7] nvme: fail cancelled commands with NVME_SC_HOST_PATH_ERROR Sagi Grimberg
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Sagi Grimberg @ 2019-08-08 20:53 UTC (permalink / raw)


Hey Hannes and Keith,

This is the third attempt to handle the reset and scanning race saga.

The approach is to have the relevant admin commands return a proper
status code that reflects that we had a transport error and
not remove the namepsace if that is indeed the case.

This should be a reliable way to know if the revalidate_disk failed
due to a transport error or not.

I am able to reproduce this race with the following command (using
tcp/rdma):
for j in `seq 50`; do for i in `seq 50`; do nvme reset /dev/nvme0; done ; nvme disconnect-all; nvme connect-all; done

With this patch set (plus two more tcp/rdma transport specific patches
that address a other issues) I was able to pass the test without
reproducing the hang that you hannes reported.

Changes from v2:
- added fc patch from James (can you test please?)
- made nvme_identify_ns return id or PTR_ERR (Hannes)

Changes from v1:
- different approach

James Smart (1):
  nvme-fc: Fail transport errors with NVME_SC_HOST_PATH

Sagi Grimberg (6):
  nvme: fail cancelled commands with NVME_SC_HOST_PATH_ERROR
  nvme: return nvme_error_status for sync commands failure
  nvme: make nvme_identify_ns propagate errors back
  nvme: make nvme_report_ns_ids propagate error back
  nvme-tcp: fail command with NVME_SC_HOST_PATH_ERROR send failed
  nvme: don't remove namespace if revalidate failed because of a
    transport error

 drivers/nvme/host/core.c | 49 +++++++++++++++++++++++++++-------------
 drivers/nvme/host/fc.c   | 37 ++++++++++++++++++++++++------
 drivers/nvme/host/tcp.c  |  2 +-
 3 files changed, 64 insertions(+), 24 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2019-08-11  5:28 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 20:53 [PATCH v3 0/7] nvme controller reset and namespace scan work race conditions Sagi Grimberg
2019-08-08 20:53 ` [PATCH v3 1/7] nvme: fail cancelled commands with NVME_SC_HOST_PATH_ERROR Sagi Grimberg
2019-08-10 11:59   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 2/7] nvme: return nvme_error_status for sync commands failure Sagi Grimberg
2019-08-10 12:06   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 3/7] nvme: make nvme_identify_ns propagate errors back Sagi Grimberg
2019-08-08 21:18   ` Keith Busch
2019-08-08 23:22     ` Sagi Grimberg
2019-08-10 12:09   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 4/7] nvme: make nvme_report_ns_ids propagate error back Sagi Grimberg
2019-08-10 12:10   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 5/7] nvme-tcp: fail command with NVME_SC_HOST_PATH_ERROR send failed Sagi Grimberg
2019-08-10 12:10   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 6/7] nvme-fc: Fail transport errors with NVME_SC_HOST_PATH Sagi Grimberg
2019-08-10 12:11   ` Hannes Reinecke
2019-08-08 20:53 ` [PATCH v3 7/7] nvme: don't remove namespace if revalidate failed because of a transport error Sagi Grimberg
2019-08-10 12:14   ` Hannes Reinecke
2019-08-11  5:28     ` Sagi Grimberg
2019-08-08 23:26 ` [PATCH v3 0/7] nvme controller reset and namespace scan work race conditions Bart Van Assche
2019-08-08 23:33   ` Sagi Grimberg
2019-08-08 23:57     ` Bart Van Assche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox