[PATCH v4] nvmet: force reconnect when number of queue changes

Hannes Reinecke hare at suse.de
Tue Oct 25 22:53:56 PDT 2022


On 10/25/22 19:30, Chaitanya Kulkarni wrote:
> On 10/25/2022 8:50 AM, Daniel Wagner wrote:
>> In order to test queue number changes we need to make sure that the
>> host reconnects. Because only when the host disconnects from the
>> target the number of queues are allowed to change according the spec.
>>
>> The initial idea was to disable and re-enable the ports and have the
>> host wait until the KATO timer expires, triggering error
>> recovery. Though the host would see a DNR reply when trying to
>> reconnect. Because of the DNR bit the connection is dropped
>> completely. There is no point in trying to reconnect with the same
>> parameters according the spec.
>>
>> We can force to reconnect the host is by deleting all controllers. The
>> host will observe any newly posted request to fail and thus starts the
>> error recovery but this time without the DNR bit set.
>>
> 
> Without looking into the spec, isn't some sort of AEN should be used for
> this ? please correct me if I'm wrong but deleting all the controllers
> and relaying on reconnect maybe overkill ? if it doesn't exists in
> the NVMe spec then perhaps we should think/work on it to update the
> spec ? Is it worth it ?
> 
Problem is that changing the number of queues on the fly is really 
awkward, _and_ you have the problem that the number of queues is 
negotiated during the 'connect' call. So changing the number of queues 
from the controller side really requires us to reconnect to rectify the 
situation.

And no, I don't think it's overkill. It actually makes the situation 
easier as you start off from scratch with the correct number of queues.

Plus you have to quiesce all queues anyway when changing the number of 
queues; the tagset will be modified, requiring you to stop all I/O when 
doing so. So from the block layer side there isn't much of a difference 
here.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare at suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Ivo Totev, Andrew
Myers, Andrew McDonald, Martje Boudien Moerman




More information about the Linux-nvme mailing list