nvmet: do not allow model_number exceed 40 bytes

According to the NVM specifications, the model number size should be
40 bytes (bytes 63:24 of the Identify Controller data structure).
Therefore, any attempt to store a value into model_number which
exceeds 40 bytes should return an error.

Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Noam Gottlieb <ngottlieb@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Noam Gottlieb 2021-03-15 14:56:11 +00:00 • committed by Christoph Hellwig
commit 48b4c010c8
2 changed files with 7 additions and 0 deletions