All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guixin Liu <kanie@linux.alibaba.com>
To: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Hannes Reinecke <hare@suse.com>
Cc: linux-nvme@lists.infradead.org
Subject: [PATCH 0/2] nvmet: add namespace-level debugfs for reservation state
Date: Mon, 22 Jun 2026 18:44:16 +0800	[thread overview]
Message-ID: <20260622104418.2070277-1-kanie@linux.alibaba.com> (raw)

This series adds debugfs support for inspecting NVMe target reservation
(PR) state at the namespace level.

Patch 1 introduces per-namespace debugfs directories under each subsystem,
providing the infrastructure for namespace-specific debug entries.

Patch 2 adds a 'reservation' file that exposes the persistent reservation
state including enable status, generation counter, holder information, and
the full registrant list.

Example output with two registered hosts and an active holder:

  $ cat /sys/kernel/debug/nvmet/testnqn/ns1/reservation
  enable : 1
  generation : 2
  notify_mask : 0x0
  rtype : write_exclusive
  holder : hostid=11111111-1111-1111-1111-111111111111, rkey=0x1111
  registrants:
    hostid=11111111-1111-1111-1111-111111111111, rkey=0x1111
    hostid=22222222-2222-2222-2222-222222222222, rkey=0x2222

Guixin Liu (2):
  nvmet: add namespace-level debugfs directory
  nvmet: expose reservation state through debugfs

 drivers/nvme/target/core.c    |  2 +
 drivers/nvme/target/debugfs.c | 75 +++++++++++++++++++++++++++++++++++
 drivers/nvme/target/debugfs.h |  5 +++
 drivers/nvme/target/nvmet.h   |  3 ++
 4 files changed, 85 insertions(+)

-- 
2.43.7



             reply	other threads:[~2026-06-22 10:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 10:44 Guixin Liu [this message]
2026-06-22 10:44 ` [PATCH 1/2] nvmet: add namespace-level debugfs directory Guixin Liu
2026-06-22 10:44 ` [PATCH 2/2] nvmet: expose reservation state through debugfs Guixin Liu
2026-06-25  7:17 ` [PATCH 0/2] nvmet: add namespace-level debugfs for reservation state Daniel Wagner
2026-06-25  9:10   ` Guixin Liu
2026-07-06  3:10     ` Guixin Liu
2026-07-06  7:59       ` Daniel Wagner
2026-07-06 10:28         ` Guixin Liu
2026-07-06 12:57           ` Shin'ichiro Kawasaki
2026-07-07  1:42             ` Guixin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260622104418.2070277-1-kanie@linux.alibaba.com \
    --to=kanie@linux.alibaba.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=kch@nvidia.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.