Re: [PATCH v2 02/14] nvmet/debugfs: Add ctrl uniquifier and random values

From: Randy Jennings

Date: Tue Feb 10 2026 - 19:51:13 EST


On Fri, Jan 30, 2026 at 2:36 PM Mohamed Khalfella
<mkhalfella@xxxxxxxxxxxxxxx> wrote:
>
> Export ctrl->random and ctrl->uniquifier as debugfs files under
Please update to the new names.

> controller debugfs directory.
>
> Signed-off-by: Mohamed Khalfella <mkhalfella@xxxxxxxxxxxxxxx>
> ---
> drivers/nvme/target/debugfs.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/nvme/target/debugfs.c b/drivers/nvme/target/debugfs.c
> index 5dcbd5aa86e1..1300adf6c1fb 100644
> --- a/drivers/nvme/target/debugfs.c
> +++ b/drivers/nvme/target/debugfs.c
> @@ -152,6 +152,23 @@ static int nvmet_ctrl_tls_concat_show(struct seq_file *m, void *p)
> }
> NVMET_DEBUGFS_ATTR(nvmet_ctrl_tls_concat);
> #endif
> +static int nvmet_ctrl_instance_ciu_show(struct seq_file *m, void *p)
> +{
> + struct nvmet_ctrl *ctrl = m->private;
> +
> + seq_printf(m, "%02x\n", ctrl->ciu);
> + return 0;
> +}
> +NVMET_DEBUGFS_ATTR(nvmet_ctrl_instance_ciu);
> +
> +static int nvmet_ctrl_instance_cirn_show(struct seq_file *m, void *p)
> +{
> + struct nvmet_ctrl *ctrl = m->private;
> +
> + seq_printf(m, "%016llx\n", ctrl->cirn);
> + return 0;
> +}
> +NVMET_DEBUGFS_ATTR(nvmet_ctrl_instance_cirn);
>
> int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl)
> {
> @@ -184,6 +201,10 @@ int nvmet_debugfs_ctrl_setup(struct nvmet_ctrl *ctrl)
> debugfs_create_file("tls_key", S_IRUSR, ctrl->debugfs_dir, ctrl,
> &nvmet_ctrl_tls_key_fops);
> #endif
> + debugfs_create_file("ciu", S_IRUSR, ctrl->debugfs_dir, ctrl,
> + &nvmet_ctrl_instance_ciu_fops);
> + debugfs_create_file("cirn", S_IRUSR, ctrl->debugfs_dir, ctrl,
> + &nvmet_ctrl_instance_cirn_fops);
> return 0;
> }
>
> --
> 2.52.0
>