[PATCH 1/3] nvmet: make the subsystem type configurable
Hannes Reinecke
hare at suse.de
Mon Apr 11 03:52:09 PDT 2022
On 4/11/22 12:32, Sagi Grimberg wrote:
>
>
> On 4/8/22 09:59, Hannes Reinecke wrote:
>> Make the subsystem type configurable to allow for unique
>> discovery subsystems by changing the subsystem type to
>> 'discovery'.
>>
>> Signed-off-by: Hannes Reinecke <hare at suse.de>
>> ---
>> drivers/nvme/target/configfs.c | 60 +++++++++++++++++++++++++++++++++
>> drivers/nvme/target/discovery.c | 2 +-
>> drivers/nvme/target/nvmet.h | 1 +
>> 3 files changed, 62 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/nvme/target/configfs.c
>> b/drivers/nvme/target/configfs.c
>> index e44b2988759e..38b0ab9fb721 100644
>> --- a/drivers/nvme/target/configfs.c
>> +++ b/drivers/nvme/target/configfs.c
>> @@ -834,6 +834,7 @@ static int nvmet_port_subsys_allow_link(struct
>> config_item *parent,
>> }
>> list_add_tail(&link->entry, &port->subsystems);
>> + subsys->port_count++;
>> nvmet_port_disc_changed(port, subsys);
>> up_write(&nvmet_config_sem);
>> @@ -862,6 +863,7 @@ static void nvmet_port_subsys_drop_link(struct
>> config_item *parent,
>> found:
>> list_del(&p->entry);
>> + subsys->port_count--;
>
> minor nit, the decrement should go before the list deletion (although
> it's safe this way as well).
>
Well, it's changed while nvmet_config_sem is held.
But anyway, will be adjusting it for the next version.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer
More information about the Linux-nvme
mailing list