• Johannes Thumshirn's avatar
    nvmet: implement namespace identify descriptor list · 637dc0f3
    Johannes Thumshirn authored
    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: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
    Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
    Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    637dc0f3
nvmet.h 8.67 KB