• Chaitanya Kulkarni's avatar
    nvmet: use NVMET_MAX_NAMESPACES to set nn value · 3c3ee165
    Chaitanya Kulkarni authored
    
    
    For Spec regarding MNAN value:-
    
    If the controller supports Asymmetric Namespace Access Reporting, then
    this field shall be set to a non-zero value that is less than or equal
    to the NN value.
    
    Instead of using subsys->max_nsid that gets calculated dynamically,
    use NVMET_MAX_NAMESPACES value to report NN. This way we will maintain
    the MNAN value spec compliant with NN.
    
    Without this patch, code results in the following error :-
    
    [337976.409142] nvme nvme1: Invalid MNAN value 1024
    Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    3c3ee165
admin-cmd.c 26 KB