Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvme_scan_topology() triggers I/O errors logged in kmsg #485

Closed
tbzatek opened this issue Sep 26, 2022 · 4 comments
Closed

nvme_scan_topology() triggers I/O errors logged in kmsg #485

tbzatek opened this issue Sep 26, 2022 · 4 comments

Comments

@tbzatek
Copy link
Contributor

tbzatek commented Sep 26, 2022

The NVME_IDENTIFY_CNS_NS_DESC_LIST Namespace Identification Descriptor list (CNS Value 0x03) is a NVMe 1.3 feature yet it's called for all devices as part of the topology scanning, trigerred e.g. by nvme_scan_topology() from the nvme list command.

libnvme/src/nvme/tree.c

Lines 1785 to 1786 in 212a72b

if (!nvme_ns_identify_descs(n, descs))
nvme_ns_parse_descriptors(n, descs);

This is expected to fail on devices not supporting this and the code copes well with that. The problem are these annoying high-severity messages logged from the kernel side:

nvme0: Admin Cmd(0x6), I/O Error (sct 0x0 / sc 0x2) DNR 
nvme1: Admin Cmd(0x6), I/O Error (sct 0x0 / sc 0x2) DNR 

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/nvme/host/core.c?h=v5.19.7#n298

I haven't found any obvious way to silence them. Ideally status codes from admin commands related to an unsupported functionality should not be logged at all.

For the record, this is my testing system:

# nvme list -v
Subsystem        Subsystem-NQN                                                                                    Controllers
---------------- ------------------------------------------------------------------------------------------------ ----------------
nvme-subsys1     nqn.2014.08.org.nvmexpress:80868086PHLE802300CP6P4OGN  INTEL SSDPE2KE064T7                       nvme1
nvme-subsys0     nqn.2014.08.org.nvmexpress:80868086PHLE802300956P4OGN  INTEL SSDPE2KE064T7                       nvme0

Device   SN                   MN                                       FR       TxPort Address        Subsystem    Namespaces      
-------- -------------------- ---------------------------------------- -------- ------ -------------- ------------ ----------------
nvme1    PHLE802300CP6P4OGN   INTEL SSDPE2KE064T7                      QDV101D1 pcie   0005:01:00.0   nvme-subsys1 nvme1n1
nvme0    PHLE802300956P4OGN   INTEL SSDPE2KE064T7                      QDV101D1 pcie   0004:01:00.0   nvme-subsys0 nvme0n1

Device       Generic      NSID     Usage                      Format           Controllers     
------------ ------------ -------- -------------------------- ---------------- ----------------
/dev/nvme1n1 /dev/ng1n1   1          6.40  TB /   6.40  TB    512   B +  0 B   nvme1
/dev/nvme0n1 /dev/ng0n1   1          6.40  TB /   6.40  TB    512   B +  0 B   nvme0
@igaw
Copy link
Collaborator

igaw commented Sep 26, 2022

IIRC, @keithbusch suggest to silence this message in the kernel.

@igaw
Copy link
Collaborator

igaw commented Sep 26, 2022

linux-nvme/nvme-cli#1593

@tbzatek
Copy link
Contributor Author

tbzatek commented Sep 26, 2022

Ah, good, thanks for the link!

@igaw
Copy link
Collaborator

igaw commented Oct 27, 2022

This will be fixed in the kernel:

https://lore.kernel.org/linux-nvme/20221027150417.1954662-1-kbusch@meta.com/

Thus closing this issue.

@igaw igaw closed this as completed Oct 27, 2022
@igaw igaw mentioned this issue Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants