Date: Wed, 15 Oct 2025 18:55:14 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 290259] nvme: need an ioctl to get serial number Message-ID: <bug-290259-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290259 Bug ID: 290259 Summary: nvme: need an ioctl to get serial number Product: Base System Version: 16.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org The standard way to get a disk's serial number is with the DIOCGIDENT ioctl. However, /dev/nvmeX devices don't support that, probably because they aren't technically disks. An NVME device's corresponding nda driver _does_. However, it may be difficult to determine which nda device corresponds to a given nvme device, if NVME namespaces are in use. Within the kernel, the nvme driver already knows its serial number. It's recorded in nvme_controller_data.sn . But it simply isn't exposed to user space. I propose that we implement DIOCGIDENT on nvme devices. Or, if that name is objectionable we could use NVME_IOCTL_SERIAL or NVME_IOCTL_IDENT. This would allow a user to lookup an NVME device's serial number without first translating the nvme device node into an nda device node. -- You are receiving this mail because: You are the assignee for the bug.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-290259-227>
