Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCHv3 0/5] nvme: double reset prevention
@ 2019-10-10 16:05 Keith Busch
  2019-10-10 16:05 ` [PATCHv3 1/5] nvme-pci: Free tagset if no IO queues Keith Busch
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Keith Busch @ 2019-10-10 16:05 UTC (permalink / raw)
  To: linux-nvme, Christoph Hellwig, Sagi Grimberg
  Cc: Keith Busch, Judy Brock, Edmund Nadolski, James Smart

The main objective of this series is to prevent double resets. This sort
of thing is known to have happened if a timeout occurs at roughly the
same time as a user intiated reset, like through through PCIe's FLR.

The double reset could happen because the controller disabling had been
occuring outside of the RESETTING state when we can't schedule the
reset_work, which is to occur later. When another reset schedules in
between these events, the controller ends up in the wrong state.

The end result of this series is simply to block subsequent resets by
initializing the controller state to RESETTING without actually scheduling
the reset_work.

v2 -> v3:

  Added received reviews for patches that have not been significantly
  modified from the previous version.

  Changelog updates.

  Merged to most current linux mainline.

  Added code comments for the less obvious interactions.

  Collapsed the patch that introduced the new nvme_reset_continue()
  function with the "processing paused" patch that first uses it.

  Renamed nvme_reset_continue() to nvme_reset_schedule() and documented
  its usage in comments.

  Renamed nvme_state_transient() to nvme_state_terminal() and updated
  the logic accordingly.

Keith Busch (5):
  nvme-pci: Free tagset if no IO queues
  nvme: Remove ADMIN_ONLY state
  nvme: Restart request timers in resetting state
  nvme: Prevent resets during paused controller state
  nvme: Wait for reset state when required

 drivers/nvme/host/core.c    | 90 +++++++++++++++++++++++++++----------
 drivers/nvme/host/fabrics.h |  3 +-
 drivers/nvme/host/nvme.h    |  5 ++-
 drivers/nvme/host/pci.c     | 78 +++++++++++++++++++-------------
 drivers/nvme/host/rdma.c    |  8 ++++
 drivers/nvme/host/tcp.c     |  8 ++++
 6 files changed, 133 insertions(+), 59 deletions(-)

-- 
2.21.0


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

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

end of thread, back to index

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 16:05 [PATCHv3 0/5] nvme: double reset prevention Keith Busch
2019-10-10 16:05 ` [PATCHv3 1/5] nvme-pci: Free tagset if no IO queues Keith Busch
2019-10-10 16:05 ` [PATCHv3 2/5] nvme: Remove ADMIN_ONLY state Keith Busch
2019-10-10 16:05 ` [PATCHv3 3/5] nvme: Restart request timers in resetting state Keith Busch
2019-10-10 16:05 ` [PATCHv3 4/5] nvme: Prevent resets during paused controller state Keith Busch
2019-10-10 16:09   ` Christoph Hellwig
2019-10-10 16:17     ` Keith Busch
2019-10-10 16:05 ` [PATCHv3 5/5] nvme: Wait for reset state when required Keith Busch
2019-10-10 16:18   ` Christoph Hellwig
2019-10-10 16:30     ` Keith Busch

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