[PATCH v6 06/18] nvme: Rapid Path Failure Recovery read controller identify fields
Mohamed Khalfella
mkhalfella at purestorage.com
Mon Oct 19 14:18:49 PDT 2026
On Mon 2026-10-19 18:56:04 +0200, Daniel Wagner wrote:
> > TP8028 Rapid Path Failure added new fields to controller identify
> > response. Read CIU (Controller Instance Uniquifier), CIRN (Controller
> > Instance Random Number), and CCRL (Cross-Controller Reset Limit) from
> > controller identify response. Expose CIU and CIRN as sysfs attributes
> > so the values can be used directly by user if needed.
>
> What's the use case for it? This is an public/stable interface,
> it needs a justification and documentation
CIU and CIRN identify an instance of an NVMe controller. For a given
CNTLID different values of CIU and CIRN identify different controller
instances of the same controller. The justification is that the values
allow the user to identify a specific controller instance.
host# grep . /sys/class/nvme/nvme0/{cntlid,cirn,ciu}
/sys/class/nvme/nvme0/cntlid:1
/sys/class/nvme/nvme0/cirn:42541d24813bb536
/sys/class/nvme/nvme0/ciu:57
host# nvme admin-passthru \
--opcode 0x38 \
--cdw10=$(( 0x1 | 0x57<<16 )) \
--cdw12=$(( 0x42541d24813bb536 & 0xffffffff )) \
--cdw13=$(( ( 0x42541d24813bb536 >> 32 ) & 0xffffffff )) \
/dev/nvme1
Admin Command Vendor Specific is Success and result: 0x00000000
host#
One usecase is to use the values to issue CCR command manually. Not that
I imagine one would want to do that, but if they want to do it they need
this information. CIU is also present in CCR log page. Someone reading
the log page might want to correlate a log page entry with a specific
controller, so they need the information to be exported somehow.
diff --git a/Documentation/ABI/stable/sysfs-nvme b/Documentation/ABI/stable/sysfs-nvme
index a2f5d0710db4..ebc3634c1a96 100644
--- a/Documentation/ABI/stable/sysfs-nvme
+++ b/Documentation/ABI/stable/sysfs-nvme
@@ -9,6 +9,17 @@ Description:
of the NVMe controller, as reported in the Identify
Controller data structure.
+What: /sys/class/nvme/nvmeX/cirn
+What: /sys/class/nvme/nvmeX/ciu
+Date: October 2026
+KernelVersion: 7.5
+Contact: Mohamed Khalfella <mkhalfella at purestorage.com>
+Description:
+ Shows CIRN (Controller Instance Random Number) and CIU
+ (Controller Instance Uniquifier) of the current instance
+ of the NVMe controller as reported by Identify Controller
+ data structure.
+
What: /sys/class/nvme/nvmeX/cntlid
Date: February 2016
KernelVersion: 4.6
How about a diff like the one above for a documentation? I can add
something similar to the one above assuming the change will be merged in
7.5. Or I can add it later on? Maybe in an -rc after the change is
merged?
What do you think?
>
> > Also add the nvme_fence_timeout_ms() helper that derives a fencing
> > timeout from the controller keep-alive timeout (kato).
>
> There is no user in this patch, introduce it when you use it.
Moved the hunk to patch "nvme: Implement cross-controller reset recovery"
where the function is actually used.
>
> --
> Daniel Wagner <wagi at kernel.org>
More information about the Linux-nvme
mailing list