]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: implement namespace identify descriptor list
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 7 Jun 2017 09:45:32 +0000 (11:45 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Jun 2017 12:30:21 +0000 (14:30 +0200)
commit8d83c22a9325a2c28dfb78e63fc4a9c1061746aa
tree0568200f081001f904a1d5d39d67547275821c9d
parent6a8333a9c3dd2591e20d0bca4e9925c873d2a250
nvmet: implement namespace identify descriptor list

A NVMe Identify NS command with a CNS value of '3' is expecting a list
of Namespace Identification Descriptor structures to be returned to
the host for the namespace requested in the namespace identify
command.

This Namespace Identification Descriptor structure consists of the
type of the namespace identifier, the length of the identifier and the
actual identifier.

Valid types are NGUID and UUID which we have saved in our nvme_ns
structure if they have been configured via configfs. If no value has
been assigened to one of these we return an "invalid opcode" back to
the host to maintain backward compatibiliy with older implementations
without Namespace Identify Descriptor list support.

Also as the Namespace Identify Descriptor list is the only mandatory
feature change between 1.2.1 and 1.3 we can bump the advertised
version as well.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/core.c
drivers/nvme/target/nvmet.h