nvmet: allow mn change if subsys not discovered
authorNoam Gottlieb <ngottlieb@nvidia.com>
Mon, 7 Jun 2021 09:23:23 +0000 (12:23 +0300)
committerChristoph Hellwig <hch@lst.de>
Thu, 17 Jun 2021 13:51:19 +0000 (15:51 +0200)
commit0d148efdf0f0414b2ed2dd9c31e71302bb9ce123
treec19cc225b6fe04596e893ca110cff17fde959c88
parent7ae023c5aa644211bde26db11018fe08b8408bd5
nvmet: allow mn change if subsys not discovered

Currently, once the subsystem's model_number is set for the first time
there is no way to change it. However, as long as no connection was
established to nvmf target, there is no reason for such restriction and
we should allow to change the subsystem's model_number as many times as
needed.

In addition, in order to simplfy the changes and make the model number
flow more similar to the rest of the attributes in the Identify
Controller data structure, we set a default value for the model number
at the initiation of the subsystem.

Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Noam Gottlieb <ngottlieb@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/configfs.c
drivers/nvme/target/core.c
drivers/nvme/target/discovery.c