Re: [PATCH] nvme: Force ns info updates on validation if NID is bogus

From: Yihan Xin
Date: Thu Sep 12 2024 - 22:18:52 EST


Dear Christoph and others,

I mean that, for example, there is nsid 1 on the device,
the kernel discovers it as nvme0n1. When the device
had been reconnected (in my scenario, after resuming
from an s2idle), the kernel would recognize the namespace
as nsid 2, although it is still nsid 1 on the device,
which makes the block device not found.

As Hannes said, it shall be myself misunderstood the
reason that leads to this situation.
I will try looking into the real reason. Maybe there is
something wrong in the controller?

I am sorry for the inconvenience causing to you all.
(Please forgive my poor misunderstanding, I'm very new
to kernel development.)

Best regards,
Yihan Xin

Christoph Hellwig 於 2024/9/12 17:40 寫道:
On Tue, Sep 10, 2024 at 05:50:06PM +0800, Yihan Xin wrote:
When validating a namespace, nvme_update_ns_info()
would be skipped if nsid changed. However, this
happens everytime the in-use controller is
reattached if NID is bogus, causing nsid not being
restored to the previous one, eg /dev/nvme0n2 ->
/dev/nvme0n1.

What do you mean with restoring the nsid?