All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: Daniel Wagner <dwagner@suse.de>, Christoph Hellwig <hch@lst.de>,
	 Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	 Hannes Reinecke <hare@suse.com>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH 0/2] nvmet: add namespace-level debugfs for reservation state
Date: Mon, 6 Jul 2026 21:57:02 +0900	[thread overview]
Message-ID: <akuji5egnkVWM5u2@shinmob> (raw)
In-Reply-To: <551ef1f7-ceec-4e4d-9555-0661ecbcc845@linux.alibaba.com>

On Jul 06, 2026 / 18:28, Guixin Liu wrote:
> 
> 
> 在 2026/7/6 15:59, Daniel Wagner 写道:
> > On Mon, Jul 06, 2026 at 11:10:41AM +0800, Guixin Liu wrote:
> > > > > > 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
> > > > > I expect blktests will make use of this interface eventually. The parser
> > > > > for this wont be dead simple, sure doable but not simple. If you see a
> > > > > way to make a bit simpler I wouldn't mind.
> > > > How about this:
> > > > 
> > > > 1. One holer, multi registrants:
> > > >    enable=1
> > > >    generation=2
> > > >    notify_mask=0x0
> > > >    rtype=write_exclusive
> > > >    holder=11111111-1111-1111-1111-111111111111,0x1111
> > > >    reg=11111111-1111-1111-1111-111111111111,0x1111
> > > >    reg=22222222-2222-2222-2222-222222222222,0x2222
> > > > 
> > > > 2. No holder, multi registrants:
> > > >    enable=1
> > > >    generation=1
> > > >    notify_mask=0x0
> > > >    rtype=none
> > > >    holder=none
> > > >    reg=11111111-1111-1111-1111-111111111111,0x1111
> > > >    reg=22222222-2222-2222-2222-222222222222,0x2222
> > > > 
> > > > 3. No registrant:
> > > >    enable=1
> > > >    generation=0
> > > >    notify_mask=0x0
> > > >    rtype=none
> > > >    holder=none
> > > > 
> > > > 4. Reservation not enabled:
> > > >    enable=0
...
> Hi Shin'ichiro:
>     Does this work for you?

Hi Guixin, yes, I think it is good enough. If this is sysfs, "one value
per file" and "array by files in a directory" would be guided, but this is
debugfs readonly data. So, it sounds reasonable to put some data structure into
a single debufs attribute file. Uevent like key=value format sounds good. It is
a bit wacky to use comma to hold both host id and key for a holder and a
registrant, but I cannot think of better solution.


  reply	other threads:[~2026-07-06 12:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22 10:44 [PATCH 0/2] nvmet: add namespace-level debugfs for reservation state Guixin Liu
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 [this message]
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=akuji5egnkVWM5u2@shinmob \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=dwagner@suse.de \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=kanie@linux.alibaba.com \
    --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.