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

Mohamed Khalfella mkhalfella at purestorage.com
Mon Oct 19 12:01:06 PDT 2026


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#

I found it useful to export these values while working on this change.
For example the command above can be used to trigger CCR and observe the
target behavior with the expectation that ctrl1 on the target will be
failed.

Added a sentence to the commit message to mention that.

    Export ctrl->ciu and ctrl->cirn as debugfs files under controller
    debugfs directory. The values are useful in matching host controller
    with the corresponding target controller.

> 
> > 
> > Signed-off-by: Mohamed Khalfella <mkhalfella at purestorage.com>
> > Reviewed-by: Hannes Reinecke <hare at suse.de>
> > Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
> 
> Besides the missing 'why', it looks good.
> 
> Reviewed-by: Daniel Wagner <dwagner at suse.de>
> 



More information about the Linux-nvme mailing list