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

Max Gurtovoy mgurtovoy at nvidia.com
Wed Jan 24 02:23:33 PST 2024



On 24/01/2024 11:48, Christoph Hellwig wrote:
> On Wed, Jan 24, 2024 at 02:47:30AM +0200, Max Gurtovoy wrote:
>> for example if a the PI was supported on the port before re-connection and
>> wasn't supported after the re-connection.
>> We must first identify the namespace format/identifiers before kicking the
>> old requests (otherwise we will get IO errors).
> 
> Why would the namespace identifier change when you reformat?  They
> should only change when the namespace is deleted and re-created.

Even in this case of re-creation we must sync the namespace identification.
For example, if the port went down, target re-configured but disabled PI 
offload (it was enabled previously) or someone replaced HCA to one that 
does not support PI. The queued IOs in the host would have integrity ctx 
even though the new ns/disk doesn't have ms/integrity settings. it will 
immediately fail the IO during nvme_kick_requeue_lists.



More information about the Linux-nvme mailing list