[PATCH v2 3/3] nvme: prevent ioq creation for discovery controllers

Kamaljit Singh Kamaljit.Singh1 at wdc.com
Wed Jul 2 11:09:30 PDT 2025


Hi Damien,
 
On 7/1/25 19:18, Damien Le Moal wrote:
>>  /*
>> - * An admin controller has one admin queue, but no I/O queues.
>> + * An admin or discovery controller has one admin queue, but no I/O queues.
>>   * Override queue_count so it only creates an admin queue.
>>   */
>>  void nvme_override_prohibited_io_queues(struct nvme_ctrl *ctrl)
>>  {
>> -     if (nvme_admin_ctrl(ctrl))
>> +     if (nvme_admin_ctrl(ctrl) || nvme_discovery_ctrl(ctrl))
>>               ctrl->queue_count = 1;
>>  }
>>  EXPORT_SYMBOL_GPL(nvme_override_prohibited_io_queues);
>
>Repeating comment on patch 1. Can't we do this in nvme_init_subsystem() or may
>be better, in nvme_set_queue_count() or nvme_init_ctrl_finish() ?
nvme_set_queue_count() won’t even be called in this case, as its only used to
configure IO queues, which are not being configured for an admin controller.
 
If we move nvme_override_prohibited_io_queues() up the stack into either of your
suggested core.c functions, it will affect apple & fc drivers, which I don’t have any
means of testing. Any suggestions?

Thanks,
Kamaljit 





More information about the Linux-nvme mailing list