diff options
author | Christoph Hellwig <hch@lst.de> | 2018-05-14 08:48:54 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-07-27 19:12:08 +0200 |
commit | 0d0b660f214dc4905db7b6bc998bad0c16dfb1ba (patch) | |
tree | 4c3bca154a6e7a2ae00adcfd8d2a94bd6ce64e12 /drivers/nvme/target/core.c | |
parent | 8decf5d5b9f3f72b802a017b0b035f7db0592acf (diff) | |
download | blackbird-op-linux-0d0b660f214dc4905db7b6bc998bad0c16dfb1ba.tar.gz blackbird-op-linux-0d0b660f214dc4905db7b6bc998bad0c16dfb1ba.zip |
nvme: add ANA support
Add support for Asynchronous Namespace Access as specified in NVMe 1.3
TP 4004. With ANA each namespace attached to a controller belongs to an
ANA group that describes the characteristics of accessing the namespaces
through this controller. In the optimized and non-optimized states
namespaces can be accessed regularly, although in a multi-pathing
environment we should always prefer to access a namespace through a
controller where an optimized relationship exists. Namespaces in
Inaccessible, Permanent-Loss or Change state for a given controller
should not be accessed.
The states are updated through reading the ANA log page, which is read
once during controller initialization, whenever the ANA change notice
AEN is received, or when one of the ANA specific status codes that
signal a state change is received on a command.
The ANA state is kept in the nvme_ns structure, which makes the checks in
the fast path very simple. Updating the ANA state when reading the log
page is also very simple, the only downside is that finding the initial
ANA state when scanning for namespaces is a bit cumbersome.
The gendisk for a ns_head is only registered once a live path for it
exists. Without that the kernel would hang during partition scanning.
Includes fixes and improvements from Hannes Reinecke.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Diffstat (limited to 'drivers/nvme/target/core.c')
0 files changed, 0 insertions, 0 deletions