Re: [PATCH v6 02/18] nvmet/debugfs: Export controller CIU and CIRN via debugfs

From: Mohamed Khalfella

Date: Wed Oct 21 2026 - 14:39:10 EST


On Tue 2026-10-20 14:59:04 +0200, Daniel Wagner wrote:
> On Mon, Oct 19, 2026 at 12:01:06PM -0700, Mohamed Khalfella wrote:
> > On Mon 2026-10-19 14:01:13 +0200, Daniel Wagner wrote:
> > > On 2026-09-20 11:28 -0700, Mohamed Khalfella wrote:
> > > > Export ctrl->ciu and ctrl->cirn as debugfs files under controller
> > > > debugfs directory.
> > >
> > > Could you add the 'why' part to the commit message?
> >
> > target# grep . /sys/kernel/debug/nvmet/mysubsystem/ctrl1/{ciu,cirn}
> > /sys/kernel/debug/nvmet/mysubsystem/ctrl1/ciu:57
> > /sys/kernel/debug/nvmet/mysubsystem/ctrl1/cirn:42541d24813bb536
> > target#
> >
> > 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#
>
> In the meantime, nvme-cli learned to dump those values as well. I'm not
> sure if it's worth adding these just for this use case.
>
>

Good to know that nvme-cli now parses these fields. That is said, the
sysfs and debugfs attributes are useful to have. Say the controller is
stuck in a state that it can not process an identify command.