Skip to contentSkip to conversation

nvme: Namepace identification descriptor list is optional

PATCH Ingo Brunberg 3 participants 3 messages Jul 12, 2020 – Jul 14, 2020 1 message not in the archive NVMe

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 11 lines · Revanth

Hi,

On 7/10/2020 2:22 AM, Ingo Brunberg wrote:

With commit ea43d97, appearing now in kernel 5.7.8, you made my cheap
SSD disfunctional again. For reference, see bug 205679. Maybe you remember the discussion.

Shouldn't the logic used in commit ea43d97, be applied to the line 'if (ret == -ENOMEM || (ret > 0 && !(ret & NVME_SC_DNR)))' in function '_nvme_revalidate_disk' ?

I was wondering the same. But that does not make my drive work. Something about that logic is not quite right. If the condition is met in nvme_identify_ns_descs, 0 is returned. So there is no point in repeating the same test in nvme_revalidate_disk as that code path is not reached anyway.

If I got it right, NVME_SC_DNR is not set for my drive, so this test is not the right solution for that problematic controller.

Regards
Ingo Brunberg

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

#2 lore raw
Quoted 11 lines · Ingo Brunberg
Quoted 9 lines · Revanth

Hi,

On 7/10/2020 2:22 AM, Ingo Brunberg wrote:

With commit ea43d97, appearing now in kernel 5.7.8, you made my cheap
SSD disfunctional again. For reference, see bug 205679. Maybe you remember the discussion.

Quoted 7 lines
Quoted 2 lines

Shouldn't the logic used in commit ea43d97, be applied to the line 'if (ret == -ENOMEM || (ret > 0 && !(ret & NVME_SC_DNR)))' in function '_nvme_revalidate_disk' ?

I was wondering the same. But that does not make my drive work. Something about that logic is not quite right. If the condition is met in nvme_identify_ns_descs, 0 is returned. So there is no point in repeating the same test in nvme_revalidate_disk as that code path is not reached anyway.

I agree with that... My concern is in case if the status had the DNR bit cleared.

In  that case this line of the code is reached and the status is silently suppressed to 0 because of the condition !(ret & NVME_SC_DNR)

The intention of the commit ea43d97 was to navigate back the error in-case if it was a retryable error (DNR cleared to 0).

Quoted 6 lines

If I got it right, NVME_SC_DNR is not set for my drive, so this test is not the right solution for that problematic controller.

Regards
Ingo Brunberg

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer
#3 lore raw
In reply to Ingo Brunberg
Quoted 2 lines · Ingo Brunberg

If I got it right, NVME_SC_DNR is not set for my drive, so this test is not the right solution for that problematic controller.

So your controller claims v1.3 spec compliance, but does not implement a required command type, then tells the host that we should retry that command...

I did mention the DNR reliance seemed a bit fragile considering the check was supposed to be for non-compliant controllers. The check as it exists is fixing real issues, though. I don't have an idea off the top of my head for a generic solution that will work with your controller and the issue the existing code addresses, but will think about it a bit more.

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme