[PATCH 5/8] nvme: sync the namespace scanning during ctrl start

Sagi Grimberg sagi at grimberg.me
Wed Jan 31 04:40:07 PST 2024



On 1/29/24 14:37, Max Gurtovoy wrote:
> 
> 
> On 29/01/2024 12:48, Sagi Grimberg wrote:
>>
>>>>> Even in this case of re-creation we must sync the namespace 
>>>>> identification.
>>>>
>>>> But a format is not a re-creation.
>>>>
>>>
>>> we currently don't support format in fabrics so maybe I didn't use 
>>> the correct word during my answer.
>>>
>>> because of the dynamic nature of controllers and namespaces we have 
>>> the identify ctrl/ns commands in the specification and we need to use 
>>> them.
>>
>> ns scanning has been notorious to cause issues when executing with
>> controller resets. So I don't think it is a good idea to make ctrl start
>> block until it completes, especially not for an esoteric case that
>> a ns that suddenly was reformatted between reconnects.
>>
> 
> I think that making sure that the namespace is active and validated is 
> not esoteric.

The use-case you describe is very niche and esoteric IMO.

> What is the concern ? is it the time it takes to validate a namespace ?

Max, I mentioned that I don't think it is a good idea to change the
existing behavior, because of time, because its preventing forward
progress, because it doesn't fix an existing issue, etc.
I also don't think its needed.

I think the original intent of this as made in discussions in the past 
was to simply fail upon PI mismatch when nvme_init_ns_head and
nvme_validate_ns.

> I think that AEN and reset flows are a bit different. The controller is 
> free to be modified at any time (even when no Admin queue is opened from 
> the host). It may have out-of-band management interface (for example the 
> nvmet cli) and may not have any association (AQ) to the host to notify 
> on changes.

Fundamentally things can change before the host knows about it, hence
I don't get the claim that somehow the host violates the spec.

Do others think that now namespace scanning should block
nvme_ctrl_start ? I personally don't but I'm open to justification
for why it is the right thing to do.



More information about the Linux-nvme mailing list