All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rfc 0/2] Support read-only subsystem critical warning
@ 2017-12-04  9:24 Sagi Grimberg
  2017-12-04  9:24 ` [PATCH rfc 1/2] nvme: support smart read-only critical warning event Sagi Grimberg
  2017-12-04  9:24 ` [PATCH rfc 2/2] nvmet: expose option to emulate a nvm subsystem in read-only mode Sagi Grimberg
  0 siblings, 2 replies; 14+ messages in thread
From: Sagi Grimberg @ 2017-12-04  9:24 UTC (permalink / raw)


In case a subsystem enters a read-only mode, the host shall issue
a smart log page request and check the read-only bit in the critical
warning section. In case its set, it shall set all the controller
namespaces in read-only mode (or set the namespaces in read-write in
case its cleared).

The nvmet implements emulation of this to exercise the host (might
also be useful for other use-cases as well though). Add a configfs
knob to trigger read-only subsystem critical event. Also when the
host connects to a read-only subsystem, and AER is queued to notify
the host on the critical warning.

Note that the spec does not refer to the scenario of fabrics connecting
to an already read-only subsystem so the behavior I implemented is what I
thought was most suitable. Also, the spec does not define (at least from
what I found) what happens if a subsystem moves out from read-only state,
so again, the behavior I implemented is what I found to be suitable.

Sagi Grimberg (2):
  nvme: support smart read-only critical warning event
  nvmet: expose option to emulate a nvm subsystem in read-only mode

 drivers/nvme/host/core.c          | 51 +++++++++++++++++++++++++++++++++++++++
 drivers/nvme/host/multipath.c     |  4 +++
 drivers/nvme/host/nvme.h          |  2 ++
 drivers/nvme/target/admin-cmd.c   |  3 +++
 drivers/nvme/target/configfs.c    | 34 ++++++++++++++++++++++++++
 drivers/nvme/target/core.c        |  2 +-
 drivers/nvme/target/fabrics-cmd.c |  3 +++
 drivers/nvme/target/io-cmd.c      |  8 +++++-
 drivers/nvme/target/nvmet.h       |  3 +++
 9 files changed, 108 insertions(+), 2 deletions(-)

-- 
2.14.1

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

end of thread, other threads:[~2017-12-07  6:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04  9:24 [PATCH rfc 0/2] Support read-only subsystem critical warning Sagi Grimberg
2017-12-04  9:24 ` [PATCH rfc 1/2] nvme: support smart read-only critical warning event Sagi Grimberg
2017-12-04 20:07   ` Christoph Hellwig
2017-12-05  7:28     ` Sagi Grimberg
2017-12-05  7:57       ` Johannes Thumshirn
2017-12-06 22:47       ` Christoph Hellwig
2017-12-07  6:45         ` Sagi Grimberg
2017-12-04  9:24 ` [PATCH rfc 2/2] nvmet: expose option to emulate a nvm subsystem in read-only mode Sagi Grimberg
2017-12-04 16:19   ` Christoph Hellwig
2017-12-04 18:11     ` Sagi Grimberg
2017-12-04 20:06       ` Christoph Hellwig
2017-12-05  7:22         ` Sagi Grimberg
2017-12-06 22:46           ` Christoph Hellwig
2017-12-07  6:41             ` Sagi Grimberg

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.